- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Sun, 5 Oct 2014 12:09:02 +0200
- To: Scott Miles <sjmiles@google.com>
- Cc: Mathias Bynens <mathias@qiwi.be>, WebApps WG <public-webapps@w3.org>, Addy Osmani <addyo@google.com>, Dimitri Glazkov <dglazkov@google.com>, Hajime Morrita <morrita@google.com>, Erik Arvidsson <arv@chromium.org>, Boris Zbarsky <bzbarsky@mit.edu>
On Sun, Oct 5, 2014 at 11:19 AM, Scott Miles <sjmiles@google.com> wrote: >> The URL is parsed again? That seems like something that should not >> happen. Are you copying the node perhaps? > > There is no explicit copying, but I don't know if there is something > implicit happening when the element goes trans-document. >From https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element it says that whenever an img element is adopted, its URL would be parsed again. That is what causes this. You can see this more clearly in: https://dump.testsuite.org/dom/baseurl.html I've no idea why it is that way. I assume there are some compatibility issues with not doing it. >> The lack of encapsulation is major hassle. > > I'm not sure what you mean, can you elaborate? If this is the root cause, > maybe we attack it there. If components had their own global environment to execute scripts in, that global environment would have also had its own base URL that would match that of the component. What we have instead is something that is a mix between <iframe> and <script>. Parsing abilities of the former, global environment of the latter. Doesn't really feel like it deserves to be called components. It's more like assets. -- https://annevankesteren.nl/
Received on Sunday, 5 October 2014 10:09:30 UTC