* Fix for #816 - avoid triggering a CSP (content security policy) error with `.setAttribute('style')`
* The bare unattachedDoc that I previously naively created didn't have a doctype and wasn't a HTML document, so the child style element didn't have the `old.style` attribute available
* Add a try/catch to provide some robustness in case `document.implementation.createHTMLDocument` isn't available