by Animats · 11y ago · 0 comments
Now they have to interface Servo to all the ugly stuff - the Javascript JVM, plug-ins, etc.
[1] http://www.sitetruth.com/fcgi/viewer.fcgi?url=http://store.s...
Last I heard, Servo does not plan to support plugins such as Flash. I'm not sure if the existence of Shumway changes this.
For this to work, scripts have to appear to block the parser. However, it's desirable to start fetching external resources (images, scripts, etc.) that occur after the script that's blocking the parser. In Firefox, the scripts see the state of the world as if the parser was blocked, but in reality the parser continues in the background and keeps starting fetches for the external resources it finds and keeps building a queue of operations that need to be performed in order to build the DOM according to what was parsed. If the script doesn't call document.write or calls it in a way that closes all the elements that it opens, the operation queue that got built in the background is used. If the document.write is of the bad kind, the work that was done in the background is thrown away and the input stream is rewound. See https://developer.mozilla.org/en-US/docs/Mozilla/Gecko/HTML_... for the details.
For added fun, document.write can write a script that calls document.write.
<html>
<script>
document.write("<h");
</script>1>
This is a h1 title
<script>
document.write("<!-");
</script>-
This is commented
-->
</html>
(From http://www.reddit.com/r/rust/comments/2zir9s/html5ever_proje... )