Closed
Bug 1502726
Opened 6 years ago
Closed 6 years ago
window.browser and window.chrome are undefined in content script
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1208775
People
(Reporter: nn1436401, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Steps to reproduce:
In content script of any extension the objects chrome and browser are defined.
But window.chrome and window.browser are undefined.
Expected results:
window.chrome should be defined and equal to chrome, window.browser should be equal to browser.
Comment hidden (obsolete) |
Here is console output from content script:
chrome
Object { menus: Getter & Setter, manifest: Getter & Setter, i18n: Getter & Setter, test: Getter & Setter, storage: {…}, runtime: {…}, extension: {…} }
browser
Object { menus: Getter & Setter, manifest: Getter & Setter, i18n: Getter & Setter, test: Getter & Setter, storage: {…}, runtime: {…}, extension: {…} }
window.chrome
undefined
window.browser
undefined
In JavaScript all objects are part of global object called window.
There is no reason to make these two objects special.
Comment 3•6 years ago
|
||
oops, sorry I completely misunderstood.
Updated•6 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago → 6 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: Untriaged → General
Product: Firefox → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•