Public bug reported:
Currently there is a 1:1 relationship between UserScript and a file on
disk. If the embedder wants to load more than 1 file in to a script
context, it creates multiple UserScript objects with the same context.
At the moment, we have nowhere to customize settings for a script context in
which user scripts execute. Things we might want to customize are:
- Should the context be debuggable in devtools?
- CSP settings
- Security origin
These would make sense on UserScript, if UserScript had a 1:1
relationship with a script context within a frame. I think we update
UserScript to allow this.
What I propose is:
- Deprecate creating more than 1 UserScript with the same context (allow it for
now, but print a warning if an application does that).
- Provide a new property to allow the embedder to specify multiple script URLs.
- Provide APIs to control when / where the scripts are injected (equivalent to
greasemonkey's include, exclude, run-at), and ignore inline greasemonkey
metadata for multiple-source UserScripts.
- UserScripts that inject a single source (using UserScript.url) will still be
able to be controlled using inline greasemonkey metadata
** Affects: oxide
Importance: Medium
Status: Triaged
** Changed in: oxide
Importance: Undecided => Medium
** Changed in: oxide
Status: New => Triaged
--
You received this bug notification because you are a member of Ubuntu
WebApps bug tracking, which is subscribed to Oxide.
https://bugs.launchpad.net/bugs/1495252
Title:
Allow a 1:1 relationship between UserScript and a script context for a
frame
Status in Oxide:
Triaged
Bug description:
Currently there is a 1:1 relationship between UserScript and a file on
disk. If the embedder wants to load more than 1 file in to a script
context, it creates multiple UserScript objects with the same context.
At the moment, we have nowhere to customize settings for a script context in
which user scripts execute. Things we might want to customize are:
- Should the context be debuggable in devtools?
- CSP settings
- Security origin
These would make sense on UserScript, if UserScript had a 1:1
relationship with a script context within a frame. I think we update
UserScript to allow this.
What I propose is:
- Deprecate creating more than 1 UserScript with the same context (allow it
for now, but print a warning if an application does that).
- Provide a new property to allow the embedder to specify multiple script
URLs.
- Provide APIs to control when / where the scripts are injected (equivalent
to greasemonkey's include, exclude, run-at), and ignore inline greasemonkey
metadata for multiple-source UserScripts.
- UserScripts that inject a single source (using UserScript.url) will still
be able to be controlled using inline greasemonkey metadata
To manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1495252/+subscriptions
--
Mailing list: https://launchpad.net/~ubuntu-webapps-bugs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-webapps-bugs
More help : https://help.launchpad.net/ListHelp