Closed
Bug 1410642
Opened 7 years ago
Closed 7 years ago
Async scripts from webextensions loaded on Facebook can't access global variables
Categories
(WebExtensions :: General, defect)
WebExtensions
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1408996
People
(Reporter: MR_1993, Unassigned)
Details
Attachments
(1 file)
799 bytes,
application/zip
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171003101344
Steps to reproduce:
Load the attached extension, which loads 2 content scripts on any URL:
content_script1.js:
window.test = {"test": "test"};
content_script2:js
window.addEventListener("DOMContentLoaded", function() {
try {
console.log(test.test);
}
catch (e) {
console.log("Access failed:", e);
}
});
Open facebook.com, logged in. (The extension seems to work as expected on all other URLs).
Actual results:
The console logs "Access failed: ReferenceError: test is not defined".
Expected results:
The console should log "test".
This issue affects Vimium-ff[0], specifically as (part of) [1], and so the extension doesn't work on Facebook for our Firefox users.
[0]: https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/
[1]: https://github.com/philc/vimium/issues/2675
Some more failing URLs from another issue filed against Vimium[0]:
https://support.microsoft.com/en-us/help/12445/windows-keyboard-shortcuts
https://support.microsoft.com/en-us/help/13805/windows-keyboard-shortcuts-in-apps
Updated•7 years ago
|
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•