Restore compatibility between TemplateBinding and Custom Elements polyfill. TemplateBinding now uses a staging document for creating elements. Elements should be upgraded there.
Custom Elements requires manually setting up documents to support custom elements. To solve this generally, this requirement could be removed. Alternatively, TemplateBinding could be setup to work with the CE polyfill. For simplicity we’ve directly patched importNode here. This is the mechanism TemplateBinding uses to create dom in the staging document. Also included is a temp workaround for SD polyfill support for importNode.