- From: <bugzilla@jessica.w3.org>
- Date: Fri, 10 Oct 2014 17:07:36 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27016 --- Comment #3 from Dimitri Glazkov <dglazkov@chromium.org> --- (In reply to Boris Zbarsky from comment #2) > You're not defining the [[Construct]]. No, I am defining F in that algo. I could make that more clear. The verbiage just before that ("Let CONSTRUCTOR be the interface object whose interface prototype object is PROTOTYPE and when called as a constructor, executes these steps") tries to do the thing you're describing below. > > You're defining part of the [[Call]] of the Web IDL constructor, which > doesn't have a useful context object as Web IDL is specified right now. In > particular, the "this" value when the [[Call]] is invoked in this case is > some random JS object (the one the default [[Construct]] allocated), not an > Element instance. > > In particular, the relevant part of Web IDL is step 5 of the [[Call]] > internal method of interface objects, which does: > > 5. Let R be the result of performing the actions listed in the description > of > constructor with values as the argument values. > > and what you're doing is providing said list of actions. Which means its > result needs to be R (in this case the Element). > > Once ES6 gets its @@create/whatever story in order and Web IDL is updated > accordingly we'll see what custom elements needs to say here to sync up with > that. But for now what it says is nonsensical, sorry. It needs to be > actually creating the element it wants to return from [[Call]]. Right. In a way, I am trying to straddle the magical Web IDL land and the barren ES5 land until ES6 comes along. Would love any specific diffs/patches on how that could be made better. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 10 October 2014 17:07:38 UTC