Financial-Times/polyfill-service — pull request #222 by triblondon (2014-12-13 12:42:01+00:00)
Title: Adventures in Document constructor, HTML5Shiv and cloneNode

continues from https://github.com/Financial-Times/polyfill-service/pull/218:

As noted in https://github.com/Financial-Times/polyfill-service/issues/211#issuecomment-66874882, there's a tight coupling between this solution and the one for clonenode (#203, #219). I've merged clonenode changes into this branch and made some more. Current summary:

* Reduce `Document` polyfill to just a constructor polyfill
* Separate out the `HTMLDocument` polyfill
* Add the canonical HTML5Shiv polyfill separately under a new `~HTML5Shiv` feature, on the basis that it's not the name of a Web API, so we need some sort of namespacing to indicate that. It's a problem we've run into a bit before, so I offer this as a proposed standard.
* Use the new version of the cloneNode polyfill which just augments the native cloneNode (note this will now drop support for cloneNode in IE7, which I don't think is working anyway)

There are still possible bugs associated with breaking polyfills that are dependents of Document, so this needs a bit more testing before merging. @Bockit how does this look to you?