Closed Bug 963948 Opened 10 years ago Closed 10 years ago

JS constructors can be called without 'new'

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

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.
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
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.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.