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

On Apr 14, 2013, at 11:40 AM, Scott Miles wrote:

> >> Here are four ways to avoid the subclassing problem for custom elements
> >> 1)  Only allow instances of custome dom elements to be instantiated using document.createElement("x-foo"). 
> 
> Wearing web developer hat, I never make elements any other way than createElement (or HTML), so this would be standard operating procedure, so that's all good if we can get buy in.

However, I believe that some people such as Alex Russell have been advocating that WebIDL should be allow constructor-like interfaces  to support expressions such as:
       new HTMLWhateverElement()

It would be future hostile to make that impossible, but support could reasonably wait for ES6 support.

> 
> >> 2, 3, 4
> 
> I believe have been suggested in one form or another, but as I mentioned, were determined to be non-starters for Gecko. I don't think we've heard anything from IE team.

Well #4 has been accepted for ES6 by all TC39 participants including Mozilla and Microsoft and is going to happen.  The basic scheme was actually suggested a member of the SpiderMonkey team so I'm sure we'll get it worked out for Gecko. 

Allen

Received on Sunday, 14 April 2013 19:07:55 UTC