- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Sun, 6 Oct 2013 18:21:38 +0200
- To: Dimitri Glazkov <dglazkov@chromium.org>
- Cc: Angelina Fabbro <angelinafabbro@gmail.com>, public-webapps <public-webapps@w3.org>
On Sun, Oct 6, 2013 at 5:25 PM, Dimitri Glazkov <dglazkov@chromium.org> wrote:
> On Sun, Oct 6, 2013 at 6:26 AM, Angelina Fabbro <angelinafabbro@gmail.com>
> wrote:
>> And, if the script is executed against the global/window object of the
>> main document, can and should you be able to access the imported document?
>
> You can and you should. HTML Imports are effectively #include for the Web.
So you have <link href=blah.html> in meh.html and blah.html is:
<div id=test></div>
<script> /* how do I get to #test? */ </script>
Having thought a bit more about how declarative custom elements would
work that might not actually be much of a problem (assuming we go with
Allen's model), but it seems somewhat worrying that the document the
<script> elements are inserted in is not actually the one the scripts
operate on.
(The way I expect we'll do declarative custom elements is <element
constructor=X> combined with <script> class X extends HTMLElement {
... } </script>.)
--
http://annevankesteren.nl/
Received on Sunday, 6 October 2013 16:22:06 UTC