1 |
|
2 | // custom elements with es5 classes
|
3 |
|
4 | (function () {
|
5 | ;
|
6 |
|
7 | if (window.Reflect === undefined) {
|
8 | window.Reflect = window.Reflect || {};
|
9 | window.Reflect.construct = function (parent, args, child) {
|
10 | var target = child === undefined ? parent : child;
|
11 | var prototype = target.prototype || Object.prototype;
|
12 | var copy = Object.create(prototype);
|
13 | return Function.prototype.apply.call(parent, copy, args) || copy;
|
14 | };
|
15 | }
|
16 |
|
17 | // if (
|
18 | // !(window.Reflect === undefined ||
|
19 | // window.customElements === undefined ||
|
20 | // window.customElements.hasOwnProperty('polyfillWrapFlushCallback'))
|
21 | // ) {
|
22 | // let htmlelement = HTMLElement;
|
23 | // window.HTMLElement = function HTMLElement () { return Reflect.construct(htmlelement, [], this.constructor); };
|
24 | // HTMLElement.prototype = htmlelement.prototype;
|
25 | // HTMLElement.prototype.constructor = HTMLElement;
|
26 | // Object.setPrototypeOf(HTMLElement, htmlelement);
|
27 | // }
|
28 |
|
29 | }());
|