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.)
-
-
cc
@ManishEarth: Here’s another silly idea: What if you could never store a strong reference from Rust code to a DOM object, ever? All JS object pointers would be forced with lifetimes to be stack-only. Use the reserved slot API and native JS collections for object data. -
How do you create new objects? Create a rooting context first? (This is what josephine does, innit?)
- 13 more replies
New conversation -
-
-
Sure, polyfills are fine, though you up with things like Shadow DOM, where there are DOM nodes that are sort of there but not really.
-
More problematic are JS APIs which switch off security, e.g. can see though x-origin wrappers.
End of conversation
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.