scripting.executeScript should support injection of scripts in about:blank / sandboxed pages
Categories
(WebExtensions :: General, enhancement, P2)
Tracking
(firefox98 fixed)
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: robwu, Assigned: willdurand)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: [mv3-m2])
Attachments
(1 file)
Bug 1739643 - Allow `scripting.executeScript()` to inject into about:blank/sandboxed pages. r?robwu!
(deleted),
text/x-phabricator-request
|
Details |
For static / dynamically registered content scripts, it is possible to specify whether scripts should be injected in about:blank / data:-URLs / sandboxed pages /blob:-URLs, etc.
tabs.executeScript
should support the ability to run in these scripts. The tabs.executeScript
API has the matchAboutBlank
option, but we should probably either set this option to true by default, or introduce a new option (for context, see https://bugzilla.mozilla.org/show_bug.cgi?id=1411641#c41 and https://bugzilla.mozilla.org/show_bug.cgi?id=1475831#c16).
It may probably be easier to unconditionally set matchAboutBlank
to true in the implementation of parent/ext-scripting.js
, so that this code path is triggered: https://searchfox.org/mozilla-central/rev/d2f8488b6a704443a5c5bfc6d2878171b5f0d393/toolkit/components/extensions/parent/ext-tabs-base.js#791. The flag is ultimately checked at https://searchfox.org/mozilla-central/rev/d2f8488b6a704443a5c5bfc6d2878171b5f0d393/toolkit/components/extensions/WebExtensionPolicy.cpp#701-713
A unit test to check this scenario is <iframe srcdoc>
and/or <iframe>
(about:blank).
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Depends on D133763
Comment 3•3 years ago
|
||
bugherder |
Reporter | ||
Comment 4•2 years ago
|
||
The sandbox injection depends on fixing bug 1411641.
Description
•