Re: [webcomponents]: Platonic form of custom elements declarative syntax

On Wed, Apr 10, 2013 at 8:19 PM, Daniel Buchner <daniel@mozilla.com> wrote:

> Here are a few (compelling?) answers/arguments:
>
>    1. Style elements had never done this before, yet it rocks socks:
>    <style scoped>
>
>
Beat me to it. Another date point is @keyframes/@font-face, which are
(today)
ignored in <style scoped>.

So there's already precedence for behavioral changes in the brave new world
of web components. Since custom elements are fundamentally a new concept
for web development, I don't think it's unreasonable to ask developers to
expect slight differences. Familiar friends can act a little kooky now and
then :)


>    1. It would be new for script elements, but hardly new for other
>    elements. There are plenty of elements that have various behaviors or
>    visual representations only when placed inside specific elements. Given
>    this is already an advanced web API, I'm not sure a little upfront learning
>    is a huge concern. We could even allow for this, given the paradigm is
>    already established: <script scoped>  *// could scope 'this' ref to
>    the parentNode*
>    2. Are you referring to <template> attachment here? If so, I agree,
>    thus the proposal I submitted allows for both (
>    https://gist.github.com/csuwldcat/5360471). If you want your template
>    automatically associated with your <element>, put it inside, if not, you
>    can specify which <template> a custom element should use by reference to
>    its ID.
>
>
> On Wed, Apr 10, 2013 at 8:00 PM, John J Barton <
> johnjbarton@johnjbarton.com> wrote:
>
>>
>>
>>
>> On Wed, Apr 10, 2013 at 6:51 PM, Dimitri Glazkov <dglazkov@google.com>wrote:
>>
>>> On Wed, Apr 10, 2013 at 6:38 PM, Rick Waldron <waldron.rick@gmail.com>
>>> wrote:
>>> > Everyone's answer to this should be "no"; changing the expected value
>>> of the
>>> > top level "this", in some magical way, simply won't work.
>>>
>>> Can you explain why you feel this way?
>>>
>>
>> 1) Because <script> has never done this before, so it better be
>> compelling.
>> 2) Because causing |this| to change by moving the <script> tag in the
>> HTML or adding a layer of elements etc seems likely to cause hard to
>> understand bugs.
>> 3) Forcing the binding based on position is inflexible.
>>
>> To be sure this is implicit-declarative vs explicit-imperative bias, not
>> evidence.
>>
>> Oh, sorry you were asking Rick.
>>  jjb
>>
>
>

Received on Thursday, 11 April 2013 04:00:48 UTC