Closed Bug 585552 Opened 14 years ago Closed 13 years ago

result of executed string is not in the same scope as the page's window

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 690529

People

(Reporter: julian.viereck, Unassigned)

References

Details

(Whiteboard: [console-2])

Executing

    foo="bar";

in the WebConsole puts the "foo" object not on the window object of the current page but on the sandbox object used to execute the string.

Related bugs:
  bug 572953: Cu.evalInSandbox should not ignore wrappedJSObject
  bug 574033: HUD Console should evaluate commands in window scope
Blocks: 529086
i'm pretty sure this is a dupe of bug 572953
I'm okay with us keeping this bug open for now.

This bug is annoying and may throw some people off, but it's not actually a blocker because you can still explicitly put things into window scope:

window.foo = "bar";

It's interesting that you can look up names in window scope without typing "window." but to set them in window scope you need to actually say "window."
Whiteboard: [kd4b7]
Whiteboard: [kd4b7]
This is a sandbox issue that we may have little control over. CCing mrbkap for guidance
Whiteboard: [console-2]
There's more useful discussion in bug 690529.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.