Closed
Bug 574033
Opened 14 years ago
Closed 14 years ago
HUD Console should evaluate commands in window scope
Categories
(DevTools :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ozten, Assigned: julian.viereck)
Details
Attachments
(1 file)
2.83 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
My first instinct when using the HUD is to run code that treats the global scope as the content's window. Repro: 1) Open a console on a page with jQuery included 2) Type $ into the console Actual: ReferenceError: $ is not defined Expected: Console would log the function and I'd know I could experiment with my page's content... Workaround: window.$ does work properly, but without a tooltip many people won't know (or want to) use window explicitly.
Assignee | ||
Comment 1•14 years ago
|
||
Note: This is not a proper fix for the problem but more a work around (it uses a with(window) { xxx } statement! That's evil, I know...). This work around shouldn't be necessary anymore after bug 572953 is fixed, which is about dealing with the root of the problem. In the meantime, this is the best/easiest solution.
Comment 2•14 years ago
|
||
Comment on attachment 457875 [details] [diff] [review] [checked-in] Patch i am a-ok with doing this until the platform issue is resolved. r=me.
Attachment #457875 -
Flags: review?(dietrich) → review+
Comment 3•14 years ago
|
||
you really should add a TODO comment about removing "with" referencing the bug 572953
Assignee | ||
Updated•14 years ago
|
Whiteboard: [checked-in]
Comment 4•14 years ago
|
||
where was this checked in?
Comment 5•14 years ago
|
||
i don't think it was yet.
Assignee | ||
Updated•14 years ago
|
Whiteboard: [checked-in] → [checkin-needed]
Comment 6•14 years ago
|
||
Comment on attachment 457875 [details] [diff] [review] [checked-in] Patch changeset: 47920:8f6215091539 tag: tip user: Julian Viereck <jviereck@mozilla.com> date: Mon Jul 19 10:51:51 2010 -0300 summary: bug 574033 - HUD Console should evaluate commands in window scope
Attachment #457875 -
Attachment description: Patch → [checked-in] Patch
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 7•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/8f6215091539
Updated•14 years ago
|
Whiteboard: [checkin-needed]
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•