Re: [webcomponents]: Of weird script elements and Benadryl

Re: subclassing builtins, the problem we have is stated here:
http://lists.w3.org/Archives/Public/public-webapps/2013JanMar/0266.html


On Sun, Apr 14, 2013 at 11:52 AM, Allen Wirfs-Brock
<allen@wirfs-brock.com>wrote:

>
> On Apr 14, 2013, at 10:49 AM, Scott Miles wrote:
>
> >>  the challenge with creating a "normal constructor"
>
> Forgive me if my language is imprecise, but the basic notion is that in
> general one cannot create a constructor that creates a DOM node because
> (most? all?) browsers make under the hood mappings to internal code (C++
> for Blink and Webkit). For example, note that HTMLElement and descendents
> are not callable from JS.
>
> Erik Arvidsson came up with a strategy for overcoming this in Blink, but
> to my recollection Boris Zbarsky said this was a non-starter in Gecko.
>
> Because of this constraint Dimitri's current system involves supplying
> only a prototype to the system, which hands you back a generated
> constructor.
>
>
> I addressed this issue in a follow message.
>
> For background on the problem and general solution see
> http://wiki.ecmascript.org/lib/exe/fetch.php?id=meetings%3Ameeting_jan_29_2013&cache=cache&media=meetings:subclassing_builtins.pdf<http://wiki.ecmascript.org/lib/exe/fetch.php?id=meetings:meeting_jan_29_2013&cache=cache&media=meetings:subclassing_builtins.pdf>
>
>
> Also http://www.2ality.com/2013/03/subclassing-builtins-es6.html
>
> Allen
>
>
>

Received on Sunday, 14 April 2013 19:06:10 UTC