I wish writing safe DOM code were as easy as "just use Rust", but it isn't. There are thorny issues around rooting and GC that are not yet solved. (This is *not* to say C or C++ are fine for DOM code. They make the problem worse.)
-
-
How do you create new objects? Create a rooting context first? (This is what josephine does, innit?)
-
Yeah, there would be some sort of context object bound to a lifetime that you could make objects with. That would also be the lifetime for roots. No need for DOMRefCell. No need for cursor objects. No need for Traceable. No need for custom collections: just use regular JS Arrays
- 12 more replies
New conversation -
-
-
That's an interesting idea. More possible in Servo due to using the GC to manage object lifetimes. How would references from, say, Browsing Context state to the document object work? Would some Rust->JS be required?
-
The browsing context state would presumably be a JS object inaccessible to script.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.