When overriding document.write() while page is loading (in inline scripts), buffer all write() calls within the script tag, and rewrite at the end. Allows for more accurate rewriting of partial HTML split over multiple write calls, eg.
The document.close() injection must happen server-side, so this is only enabled if wombat.injectDocWrite flag is set, otherwise per-call rewriting is used.
Also added improvements to try to detect partial tags that are removed if doing per-call rewriting
When overriding document.write() while page is loading (in inline scripts), buffer all write() calls within the script tag, and rewrite at the end. Allows for more accurate rewriting of partial HTML split over multiple write calls, eg.
However, for this to work, a
document.close()
call must be injected into the script, so it becomesThe document.close() injection must happen server-side, so this is only enabled if
wombat.injectDocWrite
flag is set, otherwise per-call rewriting is used.Also added improvements to try to detect partial tags that are removed if doing per-call rewriting
Fixes issue in #123