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

[[Call]] for objects w/o legacycaller #408

Closed
TimothyGu opened this issue Aug 14, 2017 · 3 comments
Closed

[[Call]] for objects w/o legacycaller #408

TimothyGu opened this issue Aug 14, 2017 · 3 comments

Comments

@TimothyGu
Copy link
Member

For legacy platform objects w/o any legacy callers, the [[Call]] internal method immediately throws a TypeError. Unfortunately, the mere fact that [[Call]] is defined can cause certain issues, like the object being treated as callable by ES, and typeof operator returning "function".

@domenic
Copy link
Member

domenic commented Aug 14, 2017

Wow, great catch.

I think a short-term fix is to add a prelude stating that it only exists for objects with legacy callers.

Longer-term we may want to consider creating a new type of object, "callable legacy platform objects", which have the same internal methods as legacy platform objects + [[Call]]. I remember we discussed that back in #202 but didn't go with it...

@annevk
Copy link
Member

annevk commented Aug 16, 2017

In discussing this with @tobie we realized that HTMLAllCollection is the only place that uses this. We might just want to move the [[Call]] algorithm to HTML and get rid of legacycaller in IDL.

TimothyGu added a commit to TimothyGu/webidl that referenced this issue Aug 16, 2017
Turns out there is only one interface in the Platform using legacy
callers (HTMLAllCollection). Define the exotic behaviors there instead.

Fixes whatwg#407.
Fixes whatwg#408.
TimothyGu added a commit to TimothyGu/webidl that referenced this issue Aug 16, 2017
Turns out there is only one interface in the Platform using legacy
callers (HTMLAllCollection). Define the exotic behaviors there instead.

Fixes whatwg#407.
Fixes whatwg#408.
@tobie
Copy link
Collaborator

tobie commented Aug 16, 2017

And here's the PR for HTML: whatwg/html#2932

TimothyGu added a commit to TimothyGu/webidl that referenced this issue Sep 9, 2017
Turns out there is only one interface in the Platform using legacy
callers (HTMLAllCollection). Define the exotic behaviors there instead.

Fixes whatwg#407.
Fixes whatwg#408.
TimothyGu added a commit to TimothyGu/webidl that referenced this issue Sep 12, 2017
Turns out there is only one interface in the Platform using legacy
callers (HTMLAllCollection). Define the exotic behaviors there instead.

Fixes whatwg#407.
Fixes whatwg#408.
annevk pushed a commit that referenced this issue Sep 12, 2017
Turns out there is only one interface in the Platform using legacy
callers (HTMLAllCollection). Define the exotic behaviors there instead.

Fixes #407.
Fixes #408.
dontcallmedom added a commit to dontcallmedom/webidl that referenced this issue Feb 8, 2018
Now that [`legacycaller` is gone](whatwg#408)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants