Closed
Bug 963948
Opened 10 years ago
Closed 10 years ago
JS constructors can be called without 'new'
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: zwol, Unassigned)
Details
The upstream test suite for the Encoding Standard (https://code.google.com/p/stringencoding/) now tests for JS constructors (specifically, TextEncoder and TextDecoder) throwing TypeError if called without the 'new' keyword. I don't actually see this requirement in the Encoding Standard or WebIDL, and I suspect legacy content issues may preclude us actually making this change anyway, but I thought I might as well file the bug.
Comment 1•10 years ago
|
||
That's wrong. WebIDL requires [[Call]] to be implemented for constructors. Can you file a bug on them?
Status: NEW → RESOLVED
Closed: 10 years ago
Component: JavaScript Engine → DOM
Resolution: --- → INVALID
Reporter | ||
Comment 2•10 years ago
|
||
Filed https://code.google.com/p/stringencoding/issues/detail?id=13 . I would appreciate it if you could argue with them if they decide to argue; I don't know beans about WebIDL.
Comment 3•10 years ago
|
||
See also https://www.w3.org/Bugs/Public/show_bug.cgi?id=22808 and https://bugzilla.mozilla.org/show_bug.cgi?id=916644
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•