Skip to content

Commit

Permalink
[Web Extension] Add content script world property to manifest schema …
Browse files Browse the repository at this point in the history
…validation (#9510)

* Add failing integration test for webext script world

* Add "world" to webext content script schema validation
  • Loading branch information
carterworks committed Jan 30, 2024
1 parent fdf495b commit 86922d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
],
"content_scripts": [{
"matches": ["https://*.google.com/*"],
"js": ["other-content-script.js"]
"js": ["other-content-script.js"],
"world": "ISOLATED"
}],
"action": {
"default_popup": "popup.html"
Expand Down
4 changes: 4 additions & 0 deletions packages/transformers/webextension/src/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ const commonProps = {
enum: ['document_idle', 'document_start', 'document_end'],
},
all_frames: boolean,
world: {
type: 'string',
enum: ['ISOLATED', 'MAIN'],
},
},
additionalProperties: false,
required: ['matches'],
Expand Down

0 comments on commit 86922d7

Please sign in to comment.