Console should use same JS version as page scripts

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
4 months ago

People

(Reporter: jryans, Unassigned)

Tracking

({dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Apparently we opt the console into JS version 1.8, giving it access to extra JS features that are not available to page scripts today.

The console should exactly match the features available to page scripts to reduce confusion.

So, for web content at least, we should go back down to the default version.  For the browser console, it's fine to stay where we are.
(Reporter)

Updated

3 years ago
See Also: → bug 932513
(Reporter)

Comment 1

3 years ago
Bug 932513 has more discussion on this topic.
Blocks: 867609
Do we have a larger effort to stop the versioning madness? Experimental JS features should be behind a single "experimental" flag, not versioned.
Ok, I should have followed the "blocks" link... ^_^
(Reporter)

Comment 4

3 years ago
Jim, as best I can tell, the web console basically just pipes strings into the Debugger API's evalWithBindings.

So, we aren't explicitly saying "eval as you would in JS version 1.8" that I can see.

Is there some way we can get the Debugger API to eval with the same JS version a page's script would use?
Flags: needinfo?(jimb)

Comment 5

3 years ago
Wow, it totally should do that. Bug 971673 would fix this, but is stalled waiting for me.
Flags: needinfo?(jimb)
(Reporter)

Updated

3 years ago
Depends on: 971673
Keywords: dev-doc-needed
Bug 1390106 fixed this.
Status: NEW → RESOLVED
Last Resolved: a year ago
Depends on: 1390106
No longer depends on: 971673
Resolution: --- → FIXED

Updated

4 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.