Skip to content

Bug 1891478 Implementation of documentId in more extension APIs#44491

Merged
rebloor merged 13 commits into
mdn:mainfrom
rebloor:Bug-1891478-Implementation-of-documentId-in-extension-APIs
Jun 23, 2026
Merged

Bug 1891478 Implementation of documentId in more extension APIs#44491
rebloor merged 13 commits into
mdn:mainfrom
rebloor:Bug-1891478-Implementation-of-documentId-in-extension-APIs

Conversation

@rebloor

@rebloor rebloor commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

This change addresses the dev-doc-needed requirements of Bug 1891478 "Implement documentId in extension APIs"

Changhes include:

  • New page

    • runtime/getdocumentid/index.md — documents the new runtime.getDocumentId() method, which returns the document UUID for a given window/frame target.
  • Updated API reference pages

    • runtime/connect/index.md — added documentId to connectInfo options.
    • runtime/sendmessage/index.md — added documentId to options.
    • proxy/requestdetails/index.md — added documentId and parentDocumentId properties.
    • webnavigation/getframe/index.md — removed a stray orphaned "Must include one of" line.
  • Navigation/index updates

    • runtime/index.md — added a runtime.getDocumentId() entry to the methods list.
    • content_scripts/index.md — added runtime.getDocumentId() to the list of APIs usable from content scripts.
  • Release notes: firefox/releases/153/index.md — new bullet under "Changes for add-on developers" summarizing all the documentId additions across runtime, scripting, userScripts, tabs, webNavigation, webRequest, and proxy, referencing bug 1891478.

Related issues and pull requests

BCD changes in PR mdn/browser-compat-data#29853

@rebloor rebloor requested a review from Rob--W June 16, 2026 19:07
@rebloor rebloor self-assigned this Jun 16, 2026
@rebloor rebloor requested review from a team as code owners June 16, 2026 19:07
@rebloor rebloor requested review from pepelsbey and removed request for a team June 16, 2026 19:07
@rebloor rebloor added the Content:WebExt WebExtensions docs label Jun 16, 2026
@github-actions github-actions Bot added Content:Firefox Content in the Mozilla/Firefox subtree size/m [PR only] 51-500 LoC changed labels Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor
Preview URLs (33 pages)
External URLs (3)

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_documentId
Title: Work with documentId


URL: /en-US/docs/Mozilla/Firefox/Releases/153
Title: Firefox 153 release notes for developers (Beta)

(comment last updated: 2026-06-23 00:10:43)

@Rob--W Rob--W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have documentation explaining the concept of documentId and reference that from all articles that mention it? Having such an article would also offer a place for a full listing of all APIs recognizing documentId one way or another. That list would initially be the same as the release notes here, but would be expanded over time as more features are added that build upon it.

You can find some explanation of why tabId+documentId can be preferred over tabId+frameId at w3c/webextensions#8

And for context: although there is currently no API to target a document by documentId only, there are discussions in the WECG about dropping the tabId requirement when documentId is used, e.g. w3c/webextensions#91

Comment thread files/en-us/mozilla/add-ons/webextensions/api/runtime/getdocumentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/api/runtime/sendmessage/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/api/runtime/connect/index.md Outdated
Comment thread files/en-us/mozilla/firefox/releases/153/index.md Outdated
Comment thread files/en-us/mozilla/firefox/releases/153/index.md Outdated
Comment thread files/en-us/mozilla/firefox/releases/153/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/api/runtime/messagesender/index.md Outdated
@github-actions github-actions Bot added the merge conflicts 🚧 [PR only] label Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

Comment thread files/en-us/mozilla/add-ons/webextensions/api/runtime/messagesender/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
@github-actions github-actions Bot removed the merge conflicts 🚧 [PR only] label Jun 21, 2026
@rebloor rebloor requested a review from Rob--W June 21, 2026 18:05

@Rob--W Rob--W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks accurate and complete. Thank you!

There are very minor additional comments, please merge when you have the chance.

Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/content_scripts/index.md
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rob Wu <rob@robwu.nl>
Comment thread files/en-us/mozilla/add-ons/webextensions/work_with_documentid/index.md Outdated
@rebloor rebloor merged commit 9791add into mdn:main Jun 23, 2026
9 checks passed
@rebloor rebloor deleted the Bug-1891478-Implementation-of-documentId-in-extension-APIs branch June 23, 2026 00:12
@rebloor

rebloor commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @Rob--W final changes made and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Firefox Content in the Mozilla/Firefox subtree Content:WebExt WebExtensions docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants