Re: The key custom elements question: custom constructors?

On Fri, Jul 17, 2015 at 4:15 PM, Domenic Denicola <d@domenic.me> wrote:
> From: Anne van Kesteren [mailto:annevk@annevk.nl]
>> It fails atomically, based on the definition of innerHTML.
>
> What if that 512 KiB of HTML contains <img src="foo.png">? Following definitions, I assume we fire off the network request?

If I look at "update the image data" step 6 it seems it might be
fetched at a later point?


> What if it contains a <x-baz></x-baz> where XBaz's constructor does `document.body.innerHTML = "<p>Hello</p>"`? Can the parsing algorithm deal with the (following the definitions, required) re-entrancy?

I think the specification can, since it just invokes the fragment
parser with some parameters and then replaces the contents of XBaz
with the obtained DocumentFragment. Implementations probably can too.
E.g., <script>document.body.innerHTML = "..." </script> is quite
similar.


-- 
https://annevankesteren.nl/

Received on Friday, 17 July 2015 14:38:43 UTC