Repository navigation
[js][bidi] Type vendor-declared BiDi fields instead of making extended types extensible - #18335
Merged
Merged
Conversation
…d types extensible
Member
|
/agentic_describe |
Member
|
/agentic_review |
Contributor
PR Summary by QodoType declared vendor fields in JavaScript BiDi records
AI Description
Merge Risk
|
2 of 3 tasks
This was referenced Nov 23, 2026
Open
This was referenced Nov 24, 2026
This was referenced Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issues
Addresses the JavaScript part of #18184. Follows the design agreed there, already implemented for Ruby (#18190) and Java (#18233).
💥 What does this PR do?
Firefox's vendor CDDL adds a few fields to some spec types, for example
moz:nameandmoz:scopeonbrowsingContext.Info. The JS BiDi generator handled this by marking those types extensible, so they accepted and sent any field, not just the vendor ones. That breaks ADR 17786.This PR types the vendor fields instead:
GetTreeParametersandInstallParametersstay closed. Vendor fields only exist onMozGetTreeParametersandMozInstallParameters, used byMozBrowsingContext.getTreeandMozWebExtension.install.browsingContext.Infogets typed, optionalmozNameandmozScope. Other browsers leave them empty. Any other unknown field is warned about and dropped.Example:
🤖 AI assistance
vendor_test.js💡 Additional Considerations
info['moz:name']/info['moz:scope']becomeinfo.mozName/info.mozScope, matching Java and Ruby naming. The shared classes also stop sending undeclared fields. This is okay since it was decided in the low-level ADR that low-level APIs stays publicly reachable but is not governed by the deprecation policy.🔄 Types of changes