Closed
Bug 844620
Opened 12 years ago
Closed 12 years ago
WebConsole doesn't allow to modify variable in a page
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 690529
People
(Reporter: laurent, Unassigned)
References
()
Details
Attachments
(1 file)
196 bytes,
text/html
|
Details |
In the web console, we can retrieve values of variable created in the content document. We can even modify them. But it doesn't really modify the variable IN the content document. It seems it modify only a copy of this variable. Steps to reproduce: 1. open the URL. it is a page where a foo variable is set with the value "ok". A function show() return the value of this variable 2. open the web console 3. type: foo 4. the console show "ok" 5. type: show() 4. the console show "ok" 6. type: foo="bar" 7. the console show "bar" 8. type: show() 9. the console show "ok" Expected result: the last show() call should return "bar" instead of "ok". It's an annoying bug when we want to debug a webpage...
I can reproduce on data-uri's, but this testcase works fine for me. Data-uris has extra restrictions on them now days, your sure that's not what your seeing?
Comment 2•12 years ago
|
||
Laurent: thanks for the bug report. This is a duplicate of bug 690529, which will be fixed by bug 783499.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Comment 3•12 years ago
|
||
Work around: you can do |window.foo = 'bar'| and it will work as intended.
Reporter | ||
Comment 4•12 years ago
|
||
Thanks Mihai. I discovered the workaround later after submitting the bug. Although it works, it is not intuitive IMHO :-) Cork: No, the issue is also with real document. And I have also the same issue within a project I'm working on, that uses a sandbox in the same way as the Web Console.
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•