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

On Fri, Apr 12, 2013 at 2:25 PM, Scott Miles <sjmiles@google.com> wrote:
> I realize this doesn't fit any existing conceptual model (that I know of)
> but I think it's worth pointing out that all we really want to do is define
> a prototype for the element (as opposed to running arbitrary script).
>
> Invented pseudo-code (not a proposal, just trying to identify a mental
> model):
>
> <element name="x-foo" extends="<something>">
>   <!-- prototype for markup -->
>   <template>
>   <template>
>   <!-- prototype for instances -->
>   <prototype>
>     readyCallback: function() {
>     },
>     someApi: function() {
>     },
>     someProperty: null
>   </prototype>
> </element>

This is actually pretty close to <implementation> element in XBL2
(http://dev.w3.org/2006/xbl2/#the-implementation-element). I was
really hoping to avoid inventing another element whose content is
script. But you can sort of see the |this| hack is an extraction of
<implementation>.

:DG<

Received on Friday, 12 April 2013 22:45:39 UTC