Closed
Bug 1153647
Opened 11 years ago
Closed 7 years ago
window object in console not same as in scripts on resource:// pages
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: offbynone, Unassigned)
Details
On resource:// pages (extensions that open in a tab, ex. Lightbeam) the window object accessed in the dev tools console is not the same window object that the scripts use. Ie. window.jQuery, window.d3, and window.angular, will all be undefined if executed from the console. However if executed while paused at a breakpoint they will be defined.
Repro steps:
Install Lightbeam extension
Click Lightbeam button (should open a tab with a resource:// url)
Open dev tools and switch to debugger tab (reload the page if there are no scripts shown due to bug1153644)
Execute window.d3 in console -> Expected output is the d3 object, but will be undefined
Set breakpoint on line 77 of data/ui.js
Click "tracking protection" toggle on upper right of screen
Script should now be paused at breakpoint
Go back to console and execute window.d3 -> output will be the d3 object
System info:
Windows 8.1 x64
Firefox Nightly 40.0a1 (4-11-2015) both 64 and 32 bit.
Both with e10s and without.
Updated•8 years ago
|
Product: Firefox → DevTools
Comment 1•7 years ago
|
||
I think this is related to how old addons used to work.
I installed Lightbeam and the page opening is a moz-extension one, not resource://, and typing window.d3 does give me access to d3.
I'm going to close this, but feel free to reopen it if you still have the issue somewhere else.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•