Bug 994357 - Use DOM overlays for safely setting node content

https://bugzilla.mozilla.org/show_bug.cgi?id=994357