test262 icon indicating copy to clipboard operation
test262 copied to clipboard

Clarify that $262.IsHTMLDDA should not be constructible

Open davidot opened this issue 2 years ago • 2 comments

In Interpreting.MD it only states:

  • When called with no arguments or with the first argument "" (an empty string) returns null.

    Note: The peculiar second requirement permits testing algorithms when they also call document.all with such arguments, so that testing for correct behavior requires knowing how the call behaves. This is rarely necessary.

    Use this property to test that ECMAScript algorithms aren't mis-implemented to treat document.all as being undefined or of type Undefined (instead of Object).

    Tests using this function must be tagged with the IsHTMLDDA feature so that only hosts supporting this property will run them.

Although it is implied nowhere does it state the function should not be constructible. This is already tested in test/annexB/language/statements/class/subclass/superclass-emulates-undefined.js

Although this test shows it shouldn't be it isn't clear if this is something that the spec provides or that it is a property of $262.IsHTMLDDA.

davidot avatar Aug 19 '22 22:08 davidot

it isn't clear if this is something that the spec provides or that it is a property of [[IsHTMLDDA]].

Neither, the changes introduced by the slot are minimal: https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-to-boolean

linusg avatar Aug 19 '22 23:08 linusg

it isn't clear if this is something that the spec provides or that it is a property of [[IsHTMLDDA]].

Neither, the changes introduced by the slot are minimal: tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-to-boolean

Sorry I meant, a property of $262.IsHTMLDDA, otherwise you have to read the entire spec (admittedly not that much) to make sure it's not there.

davidot avatar Aug 19 '22 23:08 davidot