-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1943050 new webExtension.api.userScripts
#25913
Bug 1943050 new webExtension.api.userScripts
#25913
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several entries are lacking mdn_url
. Was that intentional?
webextensions/api/runtime.json
Outdated
"edge": "mirror", | ||
"firefox": { | ||
"version_added": "136", | ||
"notes": "Available for use with Manifest V3 only." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Chrome, these two events are always available in the runtime
namespace. In Firefox, the event requires the "userScripts" permission to be granted.
}, | ||
"ExecutionWorld": { | ||
"__compat": { | ||
"support": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"support": { | |
"mdn_url": "https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/userScripts/ExecutionWorld", | |
"support": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, the mdn_url
will be added automatically once MDN documentation is published, so we don't need to add it manually here.
This pull request has merge conflicts that must be resolved before it can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please set Firefox for Android compatibility to unsupported for now.
The feature may be enabled by default soon, once https://bugzilla.mozilla.org/show_bug.cgi?id=1931556 is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay - another pass, now with compatibility data for Chrome.
}, | ||
"ExecutionWorld": { | ||
"__compat": { | ||
"support": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, the mdn_url
will be added automatically once MDN documentation is published, so we don't need to add it manually here.
}, | ||
"safari_ios": "mirror" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also specify the worldId
property separately in RegisteredUserScript
(and WorldProperties
, below), because Chrome introduced support in 133 (not 115 nor 120).
This is connected to the "multiple user script worlds feature":
- Commit: https://chromium.googlesource.com/chromium/src/+/78e7de28d840e7455b456bf7a7c2c3e6c25e71e4
- Version: https://chromium.googlesource.com/chromium/src/+/78e7de28d840e7455b456bf7a7c2c3e6c25e71e4/chrome/VERSION
- Specification: https://github.com/w3c/webextensions/blob/main/proposals/multiple_user_script_worlds.md
} | ||
} | ||
}, | ||
"WorldProperties": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also specify the worldId
property separately in WorldProperties
, below, because Chrome introduced support in 133 (not 115 nor 120).
This is connected to the "multiple user script worlds feature":
- Commit: https://chromium.googlesource.com/chromium/src/+/78e7de28d840e7455b456bf7a7c2c3e6c25e71e4
- Version: https://chromium.googlesource.com/chromium/src/+/78e7de28d840e7455b456bf7a7c2c3e6c25e71e4/chrome/VERSION
- Specification: https://github.com/w3c/webextensions/blob/main/proposals/multiple_user_script_worlds.md
Since there are only a few (3) properties in WorldProperties
, we could consider enumerating them all?
Co-authored-by: Rob Wu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MV3 data looks good. How about the legacy API though? Is that data still retained somewhere?
I am okay with merging the new bcd first and restoring the old data later if needed.
Summary
Changes for Bug 1943050 Enable userScripts API by default including:
runtime.onUserScriptMessage
andruntime.onUserScriptConnect
userScripts
APIuserScripts
permissionRelated issues
Related documentation changes in mdn/content#38073