Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.1
-
-
b6cf0672e6 (qt/qtdeclarative/dev) b6cf0672e6 (qt/tqtc-qtdeclarative/dev)
Description
Example:
class MyError extends Error { constructor() { super(); this.name = "MyError"; } } // Throws a TypeError const e = new MyError();
If I wrap the `this.name` on a `try/catch` block this works (of course, `name` is not set).
I think this is something specific on the Error implementation, because this does not throw:
class A { constructor() { this.name = "A"; } } class B extends A { constructor() { super(); this.name = "B"; } } // Does not throw const e = new B();
Attachments
Issue Links
- duplicates
-
QTBUG-84341 ECMAScript / Javascript Engine builtin objects are immutable (frozen)
- Open
-
QTBUG-22787 Cannot set properties on QJSEngine's global object in initializeEngine()
- Closed
- relates to
-
QTBUG-22356 Investigate support for 3rd party JS libraries
- Closed
For Gerrit Dashboard: QTBUG-101298 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
429349,8 | Allow limited extensions to globals | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |