Currently I'm trying to emulate beforescriptexecute with some hackery of calling window.stop, which leads to a bunch of problems cross-browser issues as stop doesn't behave the same in gecko and webkit.
Earlier on I was using <template> tags to render the document inert, but those translate into document fragments which eat up <head> and <body>.
What we actually want here, is to switch the tokenizer into a raw form, so we can just preprocess the document content before doing another document.write.
Reading through the 5.1 specification, <plaintext> is very clearly there, and even better is this part
Once a start tag with the tag name "plaintext" has been seen, that will be the last token ever seen other than character tokens (and the end-of-file token), because there is no way to switch out of the PLAINTEXT state.
Currently I'm trying to emulate
beforescriptexecute
with some hackery of callingwindow.stop
, which leads to a bunch of problems cross-browser issues asstop
doesn't behave the same in gecko and webkit.Earlier on I was using
<template>
tags to render the document inert, but those translate into document fragments which eat up<head>
and<body>
.What we actually want here, is to switch the tokenizer into a raw form, so we can just preprocess the document content before doing another document.write.
Reading through the 5.1 specification,
<plaintext>
is very clearly there, and even better is this part