This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Description
I'm trying to make my custom elements v1 work with Internet Explorer 11.
Because I cannot use "class" in IE, I use the "prototype" way to define a Custom Element.
function CE () {
return Reflect.construct( HTMLElement, [], CE )
}
CE.prototype = Object.create( HTMLElement.prototype )
CE.prototype.connectedCallback = function () { console.log( 'connected!' ) }
customElements.define( 'c-e', CE )
That works fine with Chrome with no polyfill, and with Internet Explorer 11 with this polyfill. When I use the polyfill and Chrome in the same time I get the following exception:
TypeError: Cannot read property 'create' of undefined
at new CustomElementsV1 (document-register-element.max.js:1357)
at CE (ce.html:21)
at CustomElementRegistry.define (document-register-element.max.js:1226)
at ce.html:52
I can catch the error and return nothing, then it's fine too but I'll get another exception ("super() should be called in the constructor()").
Is there a way to avoid the (first) error in Chrome?