Implement documentId in extension APIs
Categories
(WebExtensions :: General, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: robwu, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [wecg][addons-jira])
The extension API currently has tabId + frameId to identify specific frames. Several APIs (e.g. scripting.executeScript
) support a way to run code in that specific frame. The issue with the current API is that the document may have navigated between notifying the extension and the call to scripting.executeScript
. We therefore need a way for extensions to target specific documents, independent of the frame.
Chrome introduced the documentId
concept to identify specific document instances, coupled with the documentLifeCycle
and frameType
properties. This was announced at https://developer.chrome.com/blog/extension-instantnav/
Note: in the WECG there are several requests/proposals/enhancements that rely on documentId
as a primitive: https://github.com/w3c/webextensions/issues?q=is%3Aissue+documentId
Updated•1 year ago
|
Reporter | ||
Comment 1•4 months ago
|
||
There is still no official "spec" for documentId, but we discussed runtime.getDocumentId
(to complement runtime.getFrameId
) at https://github.com/w3c/webextensions/issues/800.
Description
•