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

On Fri, Apr 12, 2013 at 6:52 PM, Dimitri Glazkov <dglazkov@google.com>wrote:

> Good brainstorm! So far I see these ideas:
>
> 1) The <element> expects the constructor (prototype?) to be already
> defined somewhere earlier (Rick's strawman).
>
> Pros:
> * Because of the way parser works, nesting <script> in <element> will
> Just Work (tm)
> * Custom element initialization can be anywhere, not tied to the <element>
>
> Cons:
> * Pollutes global namespace
>

Only in the same way that the DOM currently pollutes itself, but see my
last message... if you roll in JJB's constructor property, no global
pollution.



> * Still need to figure out how to deal with generated constructors
>

Can you point me to some concrete example, docs, implementation, code
(anything) that I might gain some insight into these generated constructors
you speak of? Thanks :)

Rick


>
> 2) Invent a new element specifically for the purpose of defining
> prototypes.
>
> Pros:
> * No legacy/misunderstanding concerns
> * Precise purpose, no ambiguity
>
> Cons:
> * Yet another element that runs script. WebAppsSec people (and the web
> devs) will flog us, roll in chicken feathers and parade us around the
> village
>
> :DG<
>

Received on Friday, 12 April 2013 22:56:53 UTC