Bug 144034 - Web Inspector: cannot define an ES6 class from the console
Summary: Web Inspector: cannot define an ES6 class from the console
Status: RESOLVED DUPLICATE of bug 150752
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-04-21 20:02 PDT by Brian Burg
Modified: 2016-05-05 22:29 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2015-04-21 20:02:08 PDT
"Class declaration is not allowed in a lexically nested statement."

We do some wrapping, which prevents this from working. It would be great if it did work. Is there an easy fix?
Comment 1 Radar WebKit Bug Importer 2015-04-21 20:02:39 PDT
<rdar://problem/20645742>
Comment 2 Timothy Hatcher 2015-04-22 07:43:32 PDT

*** This bug has been marked as a duplicate of bug 141737 ***
Comment 3 Joseph Pecoraro 2015-04-22 13:28:12 PDT
FWIW the workaround is to assign:

  js> MyClass = class MyClass { };
Comment 4 Joseph Pecoraro 2015-12-15 18:34:13 PST
Lets reopen this, as we are handling the Object case separately.
Comment 5 Joseph Pecoraro 2016-05-05 22:29:39 PDT
Forward duping to the more generic bug about `let` and `const` in the Console.

Bug 150752.

*** This bug has been marked as a duplicate of bug 150752 ***