I thought you were suggesting that 'components' should just be all
javascript, and therefore loadable via <script> without any new mechanism.
I guess you meant, use <script> with some other 'type'. My mistake.
On Wed, Apr 3, 2013 at 2:23 PM, Simon Pieters <simonp@opera.com> wrote:
> On Wed, 03 Apr 2013 09:55:33 +0200, Scott Miles <sjmiles@google.com>
> wrote:
>
> Why don't we use <script> as the mechanism to import a component?
>>>
>>
>> One of the primary advancements of Custom Elements spec lies in the
>> ability
>> to combine HTML (templates), scoped CSS, and JavaScript into
>> encapsulations. General HTML markup is an ideal vehicle.
>>
>> Specific syntaxes are still under debate, but this is the kind of thing we
>> do using the polyfills:
>>
>> <element name='x-bundle-of-awesome'>
>> <template>
>> <style>
>> /* scoped to this element */
>> </style>
>> <!-- Shadow DOM markup -->
>> </template>
>> <script>
>>
>> // this === <element>
>>
>> this.register({ /* controller prototype */});
>> </script>
>> </element>
>>
>
> I don't understand how the above answers my question.
>
>
> --
> Simon Pieters
> Opera Software
>