Re: webcomponents: <import> instead of <link>

It's not clear to me why <link rel="import"> can't be dynamic. As long as
the previous document isn't somehow banished, I don't see the problem
(admittedly, looking through a keyhole).


On Tue, May 14, 2013 at 2:21 PM, Simon Pieters <simonp@opera.com> wrote:

> On Tue, 14 May 2013 23:13:13 +0200, Dimitri Glazkov <dglazkov@chromium.org>
> wrote:
>
>  On Tue, May 14, 2013 at 2:08 PM, Simon Pieters <simonp@opera.com> wrote:
>>
>>  I have proposed <script import=url></script> instead of <link rel=import
>>> href=url> before.
>>>
>>> http://lists.w3.org/Archives/**Public/public-webapps/**
>>> 2013AprJun/0009.html<http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0009.html>
>>> http://lists.w3.org/Archives/**Public/public-webapps/**
>>> 2013AprJun/0024.html<http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0024.html>
>>>
>>> Benefits:
>>>
>>>  * Components can execute script from an external resource, which <script
>>> src> can do as well, so that seems like a good fit in terms of security
>>> policy and expectations in Web sites and browsers.
>>>  * <script src> is not dynamic, so making <script import> also not
>>> dynamic
>>> seems like a good fit.
>>>  * <script> can appear in <head> without making changes to the HTML
>>> parser
>>> (in contrast with a new element).
>>>
>>> To pre-empt confusion shown last time I suggested this:
>>>
>>>  * This is not <script src>.
>>>  * This is not changing anything of the component itself.
>>>
>>
>> Both <meta> and <script> somewhat fail the taste test for me. I am not
>> objecting, just alerting of the weakness of stomach.
>>
>> <link rel="import"> has near-perfect semantics. It fails in the
>> implementation specifics (the dynamic nature).
>>
>> Both <meta> and <script> are mis-declarations. An HTML Import is
>> neither script nor metadata.
>>
>
> That seems to be an argument based on aesthetics. That's worth
> considering, of course, but I think is a relatively weak argument. In
> particular I care about the first bullet point above. <link> is not capable
> of executing script from an external resource today. What are the
> implications if it suddenly gains that ability?
>
>
> --
> Simon Pieters
> Opera Software
>
>

Received on Tuesday, 14 May 2013 21:26:58 UTC