Chrome extension api chrome.sessions how to get session ID

情到浓时终转凉″ 提交于 2021-02-11 08:22:18

问题


The chrome.sessions api specifies these three functions

getRecentlyClosed − chrome.sessions.getRecentlyClosed( Filter filter, function callback)
getDevices − chrome.sessions.getDevices( Filter filter, function callback)
restore − chrome.sessions.restore(string sessionId, function callback)

I see however no way to retrieve a sessionID to pass into the chrome.sessions.restore function.

How can I get the current sessions ID for restoring it somewhen in future?

Can I restore sessions indefinitely back in history respectively save a session?

来源:https://stackoverflow.com/questions/38683057/chrome-extension-api-chrome-sessions-how-to-get-session-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!