> >> I think the biggest unknown is memory management.
> >
> > Is this the only thing that's blocking compilation
>
> Unfortunately it's not. Some other problems I ran into:
OK. It looks like writing a new parser directly in Rust (possibly using a
translated Tokenizer.java as a tokenizer starting point) is the sensible way
forward. I'm sorry about wasting your time with the translator.
> > However, it's probably a good idea to design for a code path without the
> > off-the-main-thread (or I guess task in Rust) overhead for innerHTML. See
> > https://bugzilla.mozilla.org/show_bug.cgi?id=959150#c10
>
> Perhaps we can put the "create tree op" methods in a trait, and have one
> implementation which just applies them directly.
>
> Do we need to do script-initiated parsing in the script task in all cases?
No, does nothing in the on-the-main-thread case.
> I
> was imagining that (similar to COW DOM) we could let the script continue
> until it touches the DOM again. For document.write it seems impossible due
> to e.g.
>
>
> x = 2;
> document.write('