-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
WebExtension Manifest Version 3 #4357
base: master
Are you sure you want to change the base?
Conversation
Now I just need some test files. |
for more information, see https://pre-commit.ci
There's a problem with the way I added properties conditionally, it's complaining that I'm adding extra properties which is forbidden by |
I've experienced the same issue in the past. Unfortunately, I'm not sure how to fix this issue (I instead removed the conditional schema properties since they were non-essential in that particular case). |
somehow I forgot to do this crucial change
Any pros know a fix? Otherwise I'll just have to rethink it a little bit to remove that edgecase |
src/schemas/json/webextension.json
Outdated
"browser_style": { | ||
"deprecated": true, | ||
"description": "Do not set browser_style to true: its not support in Manifest V3 from Firefox 118. See Manifest V3 migration for browser_style.\n\nhttps://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Browser_styles#manifest_v3_migration", | ||
"const": false | ||
}, |
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.
I've now included browser_style, even in v3. The docs do claim the whole property is unsupported in v3, however they also say you may set it to false, so I've added their deprecation message, marked the property deprecated (even tho that's not part of the current spec) and set it to "const": "false"
.
I was still getting a similar error, which is really infuriating but I'm using a workaround now. |
I assumed this would have a $ref to common_action
Someone should probably open an issue about this because there's no way that's intended behaviour. I don't know where to start with that tho, wouldn't even know what to call it. |
Not specifying the default type should allow this to work
Now I've found a workaround that is completely faithful the mdn docs. |
Add support for Manifest V3, while preserving Manifest V2 support as well, based on the
manifest_version
propertyI'm somewhat new to both JSON Schemas and the WebExtension spec, so this might be incomplete. I followed the V2 to V3 Migration guide and relied on the MDN docs.