Open Bug 1891478 Opened 1 year ago Updated 4 months ago

Implement documentId in extension APIs

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

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

Blocks: 1891480
See Also: → 1930776

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.

You need to log in before you can comment on or make changes to this bug.