Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that $262.IsHTMLDDA should not be constructible #3644

Open
davidot opened this issue Aug 19, 2022 · 2 comments
Open

Clarify that $262.IsHTMLDDA should not be constructible #3644

davidot opened this issue Aug 19, 2022 · 2 comments

Comments

@davidot
Copy link

davidot commented Aug 19, 2022

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.

@linusg
Copy link
Member

linusg commented Aug 19, 2022

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

@davidot
Copy link
Author

davidot commented Aug 19, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants