Re: Behavior Attachment Redux, was Re: HTML element content models vs. components

On Tue, 11 Oct 2011, Erik Arvidsson wrote:
>
> I think one thing that is missing from this table/proposal is how the
> prototype chain is hooked up.
> 
> For the permanent case I would like to see the user defined object on
> that chain.
> 
> <script>
> function FancyButton () {}
> // registration and whatevs
> </script>
> 
> <button is=FancyButton id=b>
> 
> b.constructor === FanceButton
> b.__proto__ === FancyButton.prototype
> b.__proto__.__proto__ === HTMLButtonElement.prototype

That sounds fine to me.

I wouldn't want to require that authors use JS to define a binding though. 
If a binding doesn't define an API, just a shadow tree and some scoped 
styles, I would expect it to be purely declarative (still function when 
JS is disabled) both for the is="" case and the 'binding:' case.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 11 October 2011 21:55:29 UTC