@luftborn/custom-elements 1.1.40 → 1.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/index.js +354 -284
- package/demo/index.min.js +353 -283
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CheckBoxElement/CheckBoxElement.js +1 -0
- package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
- package/dist/elements/DropDownList/DropDownListElement.js +1 -0
- package/dist/elements/DropDownList/DropDownListElement.js.map +1 -1
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +1 -0
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/CHANGELOG.md +61 -0
- package/node_modules/@webcomponents/webcomponentsjs/README.md +64 -47
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js +14 -24
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js.map +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js +60 -0
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +1 -0
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js +95 -0
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js.map +1 -0
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +290 -250
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js +184 -177
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js +151 -135
- package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js.map +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/package.json +29 -28
- package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +5 -3
- package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_dom-index.js +17 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_js-index.js +13 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +4 -7
- package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/src/flag-parser.js +69 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/baseuri.js +28 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/after.js +47 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/before.js +40 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/index.js +14 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/remove.js +37 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/replace-with.js +42 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/custom-event.js +79 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/es6-misc.js +38 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/get-attribute-names.js +27 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/matches.js +21 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/append.js +31 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/index.js +13 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/prepend.js +42 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/replace-children.js +45 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/promise.js +50 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/svg-element-class-list.js +28 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/platform/symbol.js +64 -0
- package/node_modules/@webcomponents/webcomponentsjs/src/unresolved.js +32 -0
- package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.d.ts +174 -0
- package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js +299 -250
- package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map +1 -1
- package/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js +49 -28
- package/package.json +1 -1
- package/src/elements/CheckBoxElement/CheckBoxElement.ts +1 -0
- package/src/elements/DropDownList/DropDownListElement.ts +1 -0
- package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +1 -0
|
@@ -69,6 +69,7 @@ var CheckBoxElement = /** @class */ (function (_super) {
|
|
|
69
69
|
CheckBoxElement.prototype.addCheckBoxes = function () {
|
|
70
70
|
var _this = this;
|
|
71
71
|
var wrapper = _super.prototype.getChildElement.call(this, '.wrapper');
|
|
72
|
+
wrapper.innerHTML = "";
|
|
72
73
|
this.options.forEach(function (element, index) {
|
|
73
74
|
wrapper.insertAdjacentHTML('beforeend', utilities_1.StringUtil.StringFormat(_this.checkboxTemplate, _this.name, element, _this.name + "-" + index));
|
|
74
75
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBoxElement.js","sourceRoot":"","sources":["../../../src/elements/CheckBoxElement/CheckBoxElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,iDAAiD;AA4BjD;IAAqC,mCAAkB;IAQtD;QAAA,YACC,iBAAO,SACP;QARD,sBAAgB,GAAG,4IAIZ,CAAC;;IAIR,CAAC;IAED,sBAAI,kCAAK;aAAT;YACC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAA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gCAAM,GAAb,UAAc,MAAM;QACnB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,qCAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IACtE,CAAC;IAEM,kCAAQ,GAAf;QACC,IAAI,CAAC,KAAK,CAAC;QACX,IAAI,CAAC,UAAU,CAAC,IAAI,CACnB,IAAI,qCAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAClD,CAAC;IACH,CAAC;IAlEW,eAAe;QA1B3B,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,kBAAkB;YAC5B,QAAQ,EAAE,+CAED;YACT,KAAK,EAAE,qZAkBL;YACF,SAAS,EAAE,IAAI;SACf,CAAC;OACW,eAAe,CAmE3B;IAAD,sBAAC;CAAA,AAnED,CAAqC,uCAAkB,GAmEtD;AAnEY,0CAAe"}
|
|
@@ -66,6 +66,7 @@ var DropDownListElement = /** @class */ (function (_super) {
|
|
|
66
66
|
};
|
|
67
67
|
DropDownListElement.prototype.addOptions = function () {
|
|
68
68
|
var _this = this;
|
|
69
|
+
this.select.innerHTML = "";
|
|
69
70
|
this.options.forEach(function (element, index) {
|
|
70
71
|
_this.select.insertAdjacentHTML('beforeend', utilities_1.StringUtil.StringFormat(_this.optionTemplate, element, element));
|
|
71
72
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDownListElement.js","sourceRoot":"","sources":["../../../src/elements/DropDownList/DropDownListElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,iDAAiD;AAoCjD;IAAyC,uCAAkB;IAO1D;QAAA,YACC,iBAAO,SACP;QAPD,oBAAc,GAAG,uDAGJ,CAAC;;IAId,CAAC;IAED,sBAAI,sCAAK;aAAT;YACC,OAAO,KAAG,IAAI,CAAC,MAAM,CAAC,KAAO,CAAC;QAC/B,CAAC;aAED,UAAU,KAAa;YACtB,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3B,CAAC;;;OAJA;IAMD,sBAAI,sCAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACnC,CAAC;;;OAAA;IAED,+CAAiB,GAAjB;QACC,iBAAM,iBAAiB,WAAE,CAAC;IAC3B,CAAC;IAED,6CAAe,GAAf;QACC,IAAI,CAAC,MAAM,GAAG,iBAAM,aAAa,YAAC,cAAc,CAAC,CAAC;QAClD,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;SACzC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACf,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;SACzC;QACD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IAEO,wCAAU,GAAlB;QAAA,
|
|
1
|
+
{"version":3,"file":"DropDownListElement.js","sourceRoot":"","sources":["../../../src/elements/DropDownList/DropDownListElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,iDAAiD;AAoCjD;IAAyC,uCAAkB;IAO1D;QAAA,YACC,iBAAO,SACP;QAPD,oBAAc,GAAG,uDAGJ,CAAC;;IAId,CAAC;IAED,sBAAI,sCAAK;aAAT;YACC,OAAO,KAAG,IAAI,CAAC,MAAM,CAAC,KAAO,CAAC;QAC/B,CAAC;aAED,UAAU,KAAa;YACtB,IAAI,CAAC,MAAM,CAAC,KA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C;IAEM,sCAAQ,GAAf;QACC,IAAI,CAAC,KAAK,CAAC;QACX,IAAI,CAAC,UAAU,CAAC,IAAI,CACnB,IAAI,qCAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAClD,CAAC;IACH,CAAC;IA3DW,mBAAmB;QAlC/B,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,mBAAmB;YAC7B,QAAQ,EAAE,kKAKD;YACT,KAAK,EAAE,0pBAuBI;YACX,SAAS,EAAE,IAAI;SACf,CAAC;OACW,mBAAmB,CA4D/B;IAAD,0BAAC;CAAA,AA5DD,CAAyC,uCAAkB,GA4D1D;AA5DY,kDAAmB"}
|
|
@@ -72,6 +72,7 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
|
|
|
72
72
|
RadioButtonGroupElement.prototype.addRadioButtons = function () {
|
|
73
73
|
var _this = this;
|
|
74
74
|
var wrapper = _super.prototype.getChildElement.call(this, '.wrapper');
|
|
75
|
+
wrapper.innerHTML = "";
|
|
75
76
|
this.options.forEach(function (element, index) {
|
|
76
77
|
wrapper.insertAdjacentHTML('beforeend', utilities_1.StringUtil.StringFormat(_this.radioButtonTemplate, _this.name, element, _this.name + "-" + index, "" + (_this.required ? 'required' : '')));
|
|
77
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonGroupElement.js","sourceRoot":"","sources":["../../../src/elements/RadioButtonGroup/RadioButtonGroupElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,iDAAiD;AA4BjD;IAA6C,2CAAkB;IAQ9D;QAAA,YACC,iBAAO,SACP;QARD,yBAAmB,GAAG,iJAIf,CAAC;;IAIR,CAAC;IAED,sBAAI,0CAAK;aAAT;YACC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,OAAO,EAAT,CAAS,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;aAED,UAAU,KAAa;YACtB,IAAI,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,KAAK,KAAK,EAAjB,CAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;YACtE,IAAI,YAAY,EAAE;gBACjB,YAAY,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;aACzC;QACF,CAAC;;;OAPA;IASD,sBAAI,0CAAK;aAAT;YACC,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAClB,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,OAAO,EAAT,CAAS,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;aAC1D;iBAAM;gBACN,OAAO,IAAI,CAAC;aACZ;QACF,CAAC;;;OAAA;IAED,mDAAiB,GAAjB;QACC,iBAAM,iBAAiB,WAAE,CAAC;IAC3B,CAAC;IAED,iDAAe,GAAf;QAAA,iBAMC;QALA,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,iBAAM,cAAc,YAAC,YAAU,IAAI,CAAC,IAAI,OAAI,CAAC,CAAC;QACjE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAA,KAAK;YAC7B,OAAA,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;QAAxD,CAAwD,CACxD,CAAC;IACH,CAAC;IAEO,iDAAe,GAAvB;QAAA,
|
|
1
|
+
{"version":3,"file":"RadioButtonGroupElement.js","sourceRoot":"","sources":["../../../src/elements/RadioButtonGroup/RadioButtonGroupElement.ts"],"names":[],"mappings":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AAD,8BAAC;CAAA,AAvED,CAA6C,uCAAkB,GAuE9D;AAvEY,0DAAuB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic
|
|
7
|
+
Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
|
+
|
|
9
|
+
<!-- ## [Unreleased] -->
|
|
10
|
+
|
|
11
|
+
## [2.6.0] - 2021-08-02
|
|
12
|
+
|
|
13
|
+
- Add TS externs. ([#457](https://github.com/webcomponents/polyfills/pull/457))
|
|
14
|
+
|
|
15
|
+
## [2.5.0] - 2020-10-21
|
|
16
|
+
|
|
17
|
+
- Polyfill `Element#matches`.
|
|
18
|
+
([#400](https://github.com/webcomponents/polyfills/pull/400))
|
|
19
|
+
- Remove function declarations from platform polyfills to sastisfy internal lint
|
|
20
|
+
after import transforms.
|
|
21
|
+
([#396](https://github.com/webcomponents/polyfills/pull/396))
|
|
22
|
+
- Polyfill `Element#getAttributeNames`.
|
|
23
|
+
([#393](https://github.com/webcomponents/polyfills/pull/393))
|
|
24
|
+
- Add polyfills for ChildNode APIs.
|
|
25
|
+
([#390](https://github.com/webcomponents/polyfills/pull/390))
|
|
26
|
+
- Add polyfills for select ParentNode APIs.
|
|
27
|
+
([#389](https://github.com/webcomponents/polyfills/pull/389))
|
|
28
|
+
- Add `classList` support to `SVGElement`.
|
|
29
|
+
([#391](https://github.com/webcomponents/polyfills/pull/391))
|
|
30
|
+
- Add new entrypoints to webcomponentsjs for the 'platform' polyfills.
|
|
31
|
+
([#385](https://github.com/webcomponents/polyfills/pull/385))
|
|
32
|
+
|
|
33
|
+
## [2.4.4] - 2020-07-20
|
|
34
|
+
|
|
35
|
+
- Fixed bug where Object.assign polyfill would copy non-enumerable properties.
|
|
36
|
+
- Convert platform (`Array.from`, `CustomEvent`, `Promise` etc.) polyfills to
|
|
37
|
+
TypeScript ([#292](https://github.com/webcomponents/polyfills/pull/292))
|
|
38
|
+
- Improve types for JSCompiler compatibility
|
|
39
|
+
([#307](https://github.com/webcomponents/polyfills/pull/307))
|
|
40
|
+
- README improvements
|
|
41
|
+
([#128](https://github.com/webcomponents/polyfills/pull/128),
|
|
42
|
+
[#212](https://github.com/webcomponents/polyfills/pull/212),
|
|
43
|
+
[#214](https://github.com/webcomponents/polyfills/pull/214))
|
|
44
|
+
|
|
45
|
+
## [2.4.3] - 2020-03-16
|
|
46
|
+
|
|
47
|
+
- Maintenance release (no user-facing changes)
|
|
48
|
+
|
|
49
|
+
## [2.4.2] - 2020-02-26
|
|
50
|
+
|
|
51
|
+
- Remove unnecessary externs
|
|
52
|
+
([#272](https://github.com/webcomponents/polyfills/pull/272))
|
|
53
|
+
|
|
54
|
+
## [2.4.1] - 2020-01-09
|
|
55
|
+
|
|
56
|
+
- Maintenance release (no user-facing changes)
|
|
57
|
+
|
|
58
|
+
## [2.4.0] - 2019-11-12
|
|
59
|
+
|
|
60
|
+
- Add on-demand patching mode
|
|
61
|
+
([#189](https://github.com/webcomponents/polyfills/pull/189))
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
[](https://travis-ci.org/webcomponents/webcomponentsjs)
|
|
2
2
|
|
|
3
|
-
webcomponents.js (v1 spec polyfills)
|
|
4
|
-
================
|
|
3
|
+
# webcomponents.js (v1 spec polyfills)
|
|
5
4
|
|
|
6
5
|
> **Note**. For polyfills that work with the older Custom Elements and Shadow DOM v0 specs,
|
|
7
|
-
see the [v0 branch](https://github.com/webcomponents/webcomponentsjs/tree/v0).
|
|
6
|
+
> see the [v0 branch](https://github.com/webcomponents/webcomponentsjs/tree/v0).
|
|
8
7
|
|
|
9
8
|
> **Note**. For polyfills that include HTML Imports,
|
|
10
|
-
see the [v1 branch](https://github.com/webcomponents/webcomponentsjs/tree/v1).
|
|
9
|
+
> see the [v1 branch](https://github.com/webcomponents/webcomponentsjs/tree/v1).
|
|
11
10
|
|
|
12
11
|
A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:
|
|
13
12
|
|
|
14
|
-
- **Custom Elements v1**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/customelements), [polyfill](https://github.com/webcomponents/custom-elements)).
|
|
13
|
+
- **Custom Elements v1**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/customelements), [polyfill](https://github.com/webcomponents/polyfills/tree/master/packages/custom-elements)).
|
|
15
14
|
- **Shadow DOM v1**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/shadowdom),
|
|
16
|
-
[shadydom polyfill](https://github.com/webcomponents/shadydom), [shadycss polyfill](https://github.com/webcomponents/shadycss)).
|
|
15
|
+
[shadydom polyfill](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom), [shadycss polyfill](https://github.com/webcomponents/polyfills/tree/master/packages/shadycss)).
|
|
17
16
|
|
|
18
17
|
For browsers that need it, there are also some minor polyfills included:
|
|
19
|
-
|
|
18
|
+
|
|
19
|
+
- [`HTMLTemplateElement`](https://github.com/webcomponents/polyfills/tree/master/packages/template)
|
|
20
20
|
- [`Promise`](https://github.com/taylorhakes/promise-polyfill)
|
|
21
21
|
- `Event`, `CustomEvent`, `MouseEvent` constructors and `Object.assign`, `Array.from`
|
|
22
|
-
(see [webcomponents-platform](https://github.com/webcomponents/webcomponents-platform))
|
|
23
|
-
- [`URL constructor`](https://github.com/webcomponents/
|
|
22
|
+
(see [webcomponents-platform](https://github.com/webcomponents/webcomponents-platform))
|
|
23
|
+
- [`URL constructor`](https://github.com/webcomponents/polyfills/tree/master/packages/url)
|
|
24
24
|
|
|
25
25
|
## How to use
|
|
26
|
+
|
|
26
27
|
### Install polyfills
|
|
28
|
+
|
|
27
29
|
```bash
|
|
28
30
|
npm install @webcomponents/webcomponentsjs
|
|
29
31
|
```
|
|
@@ -76,6 +78,7 @@ For example:
|
|
|
76
78
|
```
|
|
77
79
|
|
|
78
80
|
#### Synchronous
|
|
81
|
+
|
|
79
82
|
When loaded synchronously, `webcomponents-loader.js` behaves similarly to `webcomponents-bundle.js`.
|
|
80
83
|
|
|
81
84
|
The appropriate bundle will be loaded with `document.write()` to ensure that WebComponent polyfills are available for subsequent scripts and modules.
|
|
@@ -94,8 +97,9 @@ Here's an example:
|
|
|
94
97
|
```
|
|
95
98
|
|
|
96
99
|
#### Asynchronous
|
|
100
|
+
|
|
97
101
|
When loaded asychronously with the `defer` attribute, polyfill bundles will be loaded asynchronously,
|
|
98
|
-
which means that scripts and modules that depend on webcomponents APIs
|
|
102
|
+
which means that scripts and modules that depend on webcomponents APIs _must_ be loaded
|
|
99
103
|
using `WebComponents.waitFor` function.
|
|
100
104
|
|
|
101
105
|
The `WebComponents.waitFor` function takes a callback function as an argument, and will evaluate that callback after the polyfill bundle has been loaded.
|
|
@@ -107,7 +111,10 @@ Here's an example:
|
|
|
107
111
|
|
|
108
112
|
```html
|
|
109
113
|
<!-- Load polyfills; note that "loader" will load these async -->
|
|
110
|
-
<script
|
|
114
|
+
<script
|
|
115
|
+
src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"
|
|
116
|
+
defer
|
|
117
|
+
></script>
|
|
111
118
|
|
|
112
119
|
<!-- Load a custom element definitions in `waitFor` and return a promise -->
|
|
113
120
|
<script type="module">
|
|
@@ -133,7 +140,10 @@ Here's a more complicated example:
|
|
|
133
140
|
|
|
134
141
|
```html
|
|
135
142
|
<!-- Load polyfills; note that "loader" will load these async -->
|
|
136
|
-
<script
|
|
143
|
+
<script
|
|
144
|
+
src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"
|
|
145
|
+
defer
|
|
146
|
+
></script>
|
|
137
147
|
|
|
138
148
|
<script type="module">
|
|
139
149
|
WebComponents.waitFor(async () => {
|
|
@@ -141,11 +151,10 @@ Here's a more complicated example:
|
|
|
141
151
|
await import('node_modules/fetch-polyfill/fetch.js');
|
|
142
152
|
}
|
|
143
153
|
return import('my-element.js');
|
|
144
|
-
})
|
|
154
|
+
});
|
|
145
155
|
</script>
|
|
146
156
|
|
|
147
|
-
<script type="module">
|
|
148
|
-
</script>
|
|
157
|
+
<script type="module"></script>
|
|
149
158
|
```
|
|
150
159
|
|
|
151
160
|
### WebComponentsReady event
|
|
@@ -153,9 +162,10 @@ Here's a more complicated example:
|
|
|
153
162
|
The `WebComponentsReady` event is fired when polyfills and user scripts have loaded and custom elements have been upgraded. This event is generally not needed; however, it may be useful in some cases like testing. If imperative code should wait until a specific custom element definition has loaded, it can use the platform `customElements.whenDefined` API.
|
|
154
163
|
|
|
155
164
|
### `custom-elements-es5-adapter.js`
|
|
156
|
-
According to the spec, only ES6 classes (https://html.spec.whatwg.org/multipage/scripting.html#custom-element-conformance) may be passed to the _native_ `customElements.define` API. For best performnace, ES6 should be served to browsers that support it, and ES5 code should be serve to those that don't. Since this may not always be possible, it may make sense to compile and serve ES5 to all browsers. However, if you do so, ES5-style custom element classes will now **not** work on browsers with native Custom Elements because ES5-style classes cannot properly extend ES6 classes, like `HTMLElement`.
|
|
157
165
|
|
|
158
|
-
|
|
166
|
+
According to the spec, only ES6 classes (https://html.spec.whatwg.org/multipage/scripting.html#custom-element-conformance) may be passed to the _native_ `customElements.define` API. For best performance, ES6 should be served to browsers that support it, and ES5 code should be serve to those that don't. Since this may not always be possible, it may make sense to compile and serve ES5 to all browsers. However, if you do so, ES5-style custom element classes will now **not** work on browsers with native Custom Elements because ES5-style classes cannot properly extend ES6 classes, like `HTMLElement`.
|
|
167
|
+
|
|
168
|
+
As a workaround, if your project has been compiled to ES5, load `custom-elements-es5-adapter.js` before defining Custom Elements. This adapter will automatically wrap ES5.
|
|
159
169
|
|
|
160
170
|
**The adapter must NOT be compiled.**
|
|
161
171
|
|
|
@@ -164,24 +174,50 @@ As a workaround, if your project has been compiled to ES5, load `custom-elements
|
|
|
164
174
|
The polyfills are intended to work in the latest versions of evergreen browsers. See below
|
|
165
175
|
for our complete browser support matrix:
|
|
166
176
|
|
|
167
|
-
| Polyfill
|
|
168
|
-
|
|
|
169
|
-
| Custom Elements |
|
|
170
|
-
| Shady CSS/DOM
|
|
177
|
+
| Polyfill | Edge | IE11+ | Chrome\* | Firefox\* | Safari 9+\* | Chrome Android\* | Mobile Safari\* |
|
|
178
|
+
| --------------- | :--: | :---: | :------: | :-------: | :---------: | :--------------: | :-------------: |
|
|
179
|
+
| Custom Elements | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
180
|
+
| Shady CSS/DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
171
181
|
|
|
172
182
|
\*Indicates the current version of the browser
|
|
173
183
|
|
|
174
184
|
The polyfills may work in older browsers, however require additional polyfills (such as classList, or other [platform](https://github.com/webcomponents/webcomponents-platform)
|
|
175
185
|
polyfills) to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
|
|
176
186
|
|
|
187
|
+
## Known Issues
|
|
188
|
+
|
|
189
|
+
- [Style encapsulation (inline styling in components) does not work out of the box](#shadycss)
|
|
190
|
+
- [Custom element's constructor property is unreliable](#constructor)
|
|
191
|
+
- [ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
|
|
192
|
+
|
|
193
|
+
### Style encapsulation (inline styling in components) does not work out of the box. <a id="shadycss"></a>
|
|
194
|
+
|
|
195
|
+
The ShadowDOM polyfill does not properly support CSS in ShadowDoM out of the box:
|
|
196
|
+
|
|
197
|
+
- Any styles inside components have an effect on the whole document (instead of on the component only - the encapsulation is broken).
|
|
198
|
+
- Any shadow-dom specific selectors (like `:host`) do not work.
|
|
199
|
+
|
|
200
|
+
You can fix those issues by manually calling the `ShadyCSS` APIs. See [ShadyCSS usage](https://github.com/webcomponents/shadycss#usage).
|
|
201
|
+
|
|
202
|
+
### Custom element's constructor property is unreliable <a id="constructor"></a>
|
|
203
|
+
|
|
204
|
+
See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.
|
|
205
|
+
|
|
206
|
+
In Edge and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types.
|
|
207
|
+
|
|
208
|
+
It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.)
|
|
209
|
+
|
|
210
|
+
### ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
|
|
211
|
+
|
|
212
|
+
ShadyCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadyCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.
|
|
177
213
|
|
|
178
214
|
### Manually Building
|
|
179
215
|
|
|
180
216
|
If you wish to build the bundles yourself, you'll need `node` and `npm` on your system:
|
|
181
217
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
218
|
+
- install [node.js](http://nodejs.org/) using the instructions on their website
|
|
219
|
+
- use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`
|
|
220
|
+
- make sure you have Java installed per https://www.npmjs.com/package/google-closure-compiler#java-version
|
|
185
221
|
|
|
186
222
|
Now you are ready to build the polyfills with:
|
|
187
223
|
|
|
@@ -204,26 +240,7 @@ Copyright (c) 2015 The Polymer Authors. All rights reserved.
|
|
|
204
240
|
|
|
205
241
|
## Changes in version 2.x
|
|
206
242
|
|
|
207
|
-
|
|
208
|
-
most browsers, the expectation is that web components code will be loaded via
|
|
209
|
-
ES modules.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
## Known Issues
|
|
213
|
-
|
|
214
|
-
* [ShadowDOM CSS is not encapsulated out of the box](#shadycss)
|
|
215
|
-
* [Custom element's constructor property is unreliable](#constructor)
|
|
216
|
-
* [ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
|
|
217
|
-
|
|
218
|
-
### ShadowDOM CSS is not encapsulated out of the box <a id="shadycss"></a>
|
|
219
|
-
The ShadowDOM polyfill is not able to encapsulate CSS in ShadowDOM out of the box. You need to use specific code from the ShadyCSS library, included with the polyfill. See [ShadyCSS instructions](https://github.com/webcomponents/shadycss).
|
|
220
|
-
|
|
221
|
-
### Custom element's constructor property is unreliable <a id="constructor"></a>
|
|
222
|
-
See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.
|
|
223
|
-
|
|
224
|
-
In Edge and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types.
|
|
225
|
-
|
|
226
|
-
It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.)
|
|
227
|
-
|
|
228
|
-
### ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
|
|
229
|
-
ShadyCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadyCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.
|
|
243
|
+
- The HTML Imports polyfill has been removed. Given that ES modules have shipped in
|
|
244
|
+
most browsers, the expectation is that web components code will be loaded via
|
|
245
|
+
ES modules.
|
|
246
|
+
- When using `webcomponents-loader.js` with the `defer` attribute, scripts that rely on the polyfills _must_ be loaded using `WebComponents.waitFor(loadCallback)`.
|
|
@@ -9,16 +9,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9
9
|
*/
|
|
10
10
|
(function(){/*
|
|
11
11
|
|
|
12
|
-
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
13
|
-
This code may only be used under the BSD style license found at
|
|
14
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
15
|
-
at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
16
|
-
be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
17
|
-
Google as part of the polymer project is also subject to an additional IP
|
|
18
|
-
rights grant found at http://polymer.github.io/PATENTS.txt
|
|
19
|
-
*/
|
|
20
|
-
'use strict';/*
|
|
21
|
-
|
|
22
12
|
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
23
13
|
This code may only be used under the BSD style license found at
|
|
24
14
|
http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
@@ -27,15 +17,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
27
17
|
Google as part of the polymer project is also subject to an additional IP
|
|
28
18
|
rights grant found at http://polymer.github.io/PATENTS.txt
|
|
29
19
|
*/
|
|
30
|
-
var n=window.Document.prototype.createElement,p=window.Document.prototype.createElementNS,aa=window.Document.prototype.importNode,ba=window.Document.prototype.prepend,ca=window.Document.prototype.append,da=window.DocumentFragment.prototype.prepend,ea=window.DocumentFragment.prototype.append,q=window.Node.prototype.cloneNode,r=window.Node.prototype.appendChild,t=window.Node.prototype.insertBefore,u=window.Node.prototype.removeChild,v=window.Node.prototype.replaceChild,w=Object.getOwnPropertyDescriptor(window.Node.prototype,
|
|
20
|
+
'use strict';var n=window.Document.prototype.createElement,p=window.Document.prototype.createElementNS,aa=window.Document.prototype.importNode,ba=window.Document.prototype.prepend,ca=window.Document.prototype.append,da=window.DocumentFragment.prototype.prepend,ea=window.DocumentFragment.prototype.append,q=window.Node.prototype.cloneNode,r=window.Node.prototype.appendChild,t=window.Node.prototype.insertBefore,u=window.Node.prototype.removeChild,v=window.Node.prototype.replaceChild,w=Object.getOwnPropertyDescriptor(window.Node.prototype,
|
|
31
21
|
"textContent"),y=window.Element.prototype.attachShadow,z=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),A=window.Element.prototype.getAttribute,B=window.Element.prototype.setAttribute,C=window.Element.prototype.removeAttribute,D=window.Element.prototype.getAttributeNS,E=window.Element.prototype.setAttributeNS,F=window.Element.prototype.removeAttributeNS,G=window.Element.prototype.insertAdjacentElement,H=window.Element.prototype.insertAdjacentHTML,fa=window.Element.prototype.prepend,
|
|
32
22
|
ha=window.Element.prototype.append,ia=window.Element.prototype.before,ja=window.Element.prototype.after,ka=window.Element.prototype.replaceWith,la=window.Element.prototype.remove,ma=window.HTMLElement,I=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),na=window.HTMLElement.prototype.insertAdjacentElement,oa=window.HTMLElement.prototype.insertAdjacentHTML;var pa=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(a){return pa.add(a)});function qa(a){var b=pa.has(a);a=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(a);return!b&&a}var ra=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);
|
|
33
23
|
function J(a){var b=a.isConnected;if(void 0!==b)return b;if(ra(a))return!0;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function K(a){var b=a.children;if(b)return Array.prototype.slice.call(b);b=[];for(a=a.firstChild;a;a=a.nextSibling)a.nodeType===Node.ELEMENT_NODE&&b.push(a);return b}
|
|
34
24
|
function L(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
|
|
35
|
-
function M(a,b,c){for(var f=a;f;){if(f.nodeType===Node.ELEMENT_NODE){var d=f;b(d);var e=d.localName;if("link"===e&&"import"===d.getAttribute("rel")){f=d.import;void 0===c&&(c=new Set);if(f instanceof Node&&!c.has(f))for(c.add(f),f=f.firstChild;f;f=f.nextSibling)M(f,b,c);f=L(a,d);continue}else if("template"===e){f=L(a,d);continue}if(d=d.__CE_shadowRoot)for(d=d.firstChild;d;d=d.nextSibling)M(d,b,c)}f=f.firstChild?f.firstChild:L(a,f)}};function N(){var a=!(null===O||void 0===O||!O.noDocumentConstructionObserver),b=!(null===O||void 0===O||!O.shadyDomFastWalk);this.
|
|
36
|
-
function Q(a,b){a.
|
|
37
|
-
function V(a,b,c){c=void 0===c?{}:c;var f=c.
|
|
38
|
-
l.delete(k));V(a,k,{
|
|
25
|
+
function M(a,b,c){for(var f=a;f;){if(f.nodeType===Node.ELEMENT_NODE){var d=f;b(d);var e=d.localName;if("link"===e&&"import"===d.getAttribute("rel")){f=d.import;void 0===c&&(c=new Set);if(f instanceof Node&&!c.has(f))for(c.add(f),f=f.firstChild;f;f=f.nextSibling)M(f,b,c);f=L(a,d);continue}else if("template"===e){f=L(a,d);continue}if(d=d.__CE_shadowRoot)for(d=d.firstChild;d;d=d.nextSibling)M(d,b,c)}f=f.firstChild?f.firstChild:L(a,f)}};function N(){var a=!(null===O||void 0===O||!O.noDocumentConstructionObserver),b=!(null===O||void 0===O||!O.shadyDomFastWalk);this.m=[];this.g=[];this.j=!1;this.shadyDomFastWalk=b;this.I=!a}function P(a,b,c,f){var d=window.ShadyDOM;if(a.shadyDomFastWalk&&d&&d.inUse){if(b.nodeType===Node.ELEMENT_NODE&&c(b),b.querySelectorAll)for(a=d.nativeMethods.querySelectorAll.call(b,"*"),b=0;b<a.length;b++)c(a[b])}else M(b,c,f)}function sa(a,b){a.j=!0;a.m.push(b)}function ta(a,b){a.j=!0;a.g.push(b)}
|
|
26
|
+
function Q(a,b){a.j&&P(a,b,function(c){return R(a,c)})}function R(a,b){if(a.j&&!b.__CE_patched){b.__CE_patched=!0;for(var c=0;c<a.m.length;c++)a.m[c](b);for(c=0;c<a.g.length;c++)a.g[c](b)}}function S(a,b){var c=[];P(a,b,function(d){return c.push(d)});for(b=0;b<c.length;b++){var f=c[b];1===f.__CE_state?a.connectedCallback(f):T(a,f)}}function U(a,b){var c=[];P(a,b,function(d){return c.push(d)});for(b=0;b<c.length;b++){var f=c[b];1===f.__CE_state&&a.disconnectedCallback(f)}}
|
|
27
|
+
function V(a,b,c){c=void 0===c?{}:c;var f=c.J,d=c.upgrade||function(g){return T(a,g)},e=[];P(a,b,function(g){a.j&&R(a,g);if("link"===g.localName&&"import"===g.getAttribute("rel")){var h=g.import;h instanceof Node&&(h.__CE_isImportDocument=!0,h.__CE_registry=document.__CE_registry);h&&"complete"===h.readyState?h.__CE_documentLoadHandled=!0:g.addEventListener("load",function(){var k=g.import;if(!k.__CE_documentLoadHandled){k.__CE_documentLoadHandled=!0;var l=new Set;f&&(f.forEach(function(m){return l.add(m)}),
|
|
28
|
+
l.delete(k));V(a,k,{J:l,upgrade:d})}})}else e.push(g)},f);for(b=0;b<e.length;b++)d(e[b])}
|
|
39
29
|
function T(a,b){try{var c=b.ownerDocument,f=c.__CE_registry;var d=f&&(c.defaultView||c.__CE_isImportDocument)?W(f,b.localName):void 0;if(d&&void 0===b.__CE_state){d.constructionStack.push(b);try{try{if(new d.constructorFunction!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{d.constructionStack.pop()}}catch(k){throw b.__CE_state=2,k;}b.__CE_state=1;b.__CE_definition=d;if(d.attributeChangedCallback&&b.hasAttributes()){var e=d.observedAttributes;
|
|
40
30
|
for(d=0;d<e.length;d++){var g=e[d],h=b.getAttribute(g);null!==h&&a.attributeChangedCallback(b,g,null,h,null)}}J(b)&&a.connectedCallback(b)}}catch(k){X(k)}}N.prototype.connectedCallback=function(a){var b=a.__CE_definition;if(b.connectedCallback)try{b.connectedCallback.call(a)}catch(c){X(c)}};N.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;if(b.disconnectedCallback)try{b.disconnectedCallback.call(a)}catch(c){X(c)}};
|
|
41
31
|
N.prototype.attributeChangedCallback=function(a,b,c,f,d){var e=a.__CE_definition;if(e.attributeChangedCallback&&-1<e.observedAttributes.indexOf(b))try{e.attributeChangedCallback.call(a,b,c,f,d)}catch(g){X(g)}};
|
|
@@ -43,19 +33,19 @@ function ua(a,b,c,f){var d=b.__CE_registry;if(d&&(null===f||"http://www.w3.org/1
|
|
|
43
33
|
c+"': The constructed element must not have any attributes.");if(null!==e.firstChild)throw Error("Failed to construct '"+c+"': The constructed element must not have any children.");if(null!==e.parentNode)throw Error("Failed to construct '"+c+"': The constructed element must not have a parent node.");if(e.ownerDocument!==b)throw Error("Failed to construct '"+c+"': The constructed element's owner document is incorrect.");if(e.localName!==c)throw Error("Failed to construct '"+c+"': The constructed element's local name is incorrect.");
|
|
44
34
|
return e}catch(g){return X(g),b=null===f?n.call(b,c):p.call(b,f,c),Object.setPrototypeOf(b,HTMLUnknownElement.prototype),b.__CE_state=2,b.__CE_definition=void 0,R(a,b),b}b=null===f?n.call(b,c):p.call(b,f,c);R(a,b);return b}
|
|
45
35
|
function X(a){var b=a.message,c=a.sourceURL||a.fileName||"",f=a.line||a.lineNumber||0,d=a.column||a.columnNumber||0,e=void 0;void 0===ErrorEvent.prototype.initErrorEvent?e=new ErrorEvent("error",{cancelable:!0,message:b,filename:c,lineno:f,colno:d,error:a}):(e=document.createEvent("ErrorEvent"),e.initErrorEvent("error",!1,!0,b,c,f),e.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{configurable:!0,get:function(){return!0}})});void 0===e.error&&Object.defineProperty(e,"error",
|
|
46
|
-
{configurable:!0,enumerable:!0,get:function(){return a}});window.dispatchEvent(e);e.defaultPrevented||console.error(a)};function va(){var a=this;this.
|
|
47
|
-
Y.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");ya(this,a);Aa(this,a,b);this.
|
|
48
|
-
function Aa(a,b,c){a.
|
|
49
|
-
constructorFunction:c,connectedCallback:g,disconnectedCallback:h,adoptedCallback:k,attributeChangedCallback:f,observedAttributes:l,constructionStack:[]};a.
|
|
50
|
-
function za(a){if(!1!==a.
|
|
51
|
-
Y.prototype.whenDefined=function(a){if(!qa(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.
|
|
52
|
-
function W(a,b){var c=a.
|
|
36
|
+
{configurable:!0,enumerable:!0,get:function(){return a}});window.dispatchEvent(e);e.defaultPrevented||console.error(a)};function va(){var a=this;this.g=void 0;this.F=new Promise(function(b){a.l=b})}va.prototype.resolve=function(a){if(this.g)throw Error("Already resolved.");this.g=a;this.l(a)};function wa(a){var b=document;this.l=void 0;this.h=a;this.g=b;V(this.h,this.g);"loading"===this.g.readyState&&(this.l=new MutationObserver(this.G.bind(this)),this.l.observe(this.g,{childList:!0,subtree:!0}))}function xa(a){a.l&&a.l.disconnect()}wa.prototype.G=function(a){var b=this.g.readyState;"interactive"!==b&&"complete"!==b||xa(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,f=0;f<c.length;f++)V(this.h,c[f])};function Y(a){this.s=new Map;this.u=new Map;this.C=new Map;this.A=!1;this.B=new Map;this.o=function(b){return b()};this.i=!1;this.v=[];this.h=a;this.D=a.I?new wa(a):void 0}Y.prototype.H=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructor getters must be functions.");ya(this,a);this.s.set(a,b);this.v.push(a);this.i||(this.i=!0,this.o(function(){return za(c)}))};
|
|
37
|
+
Y.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");ya(this,a);Aa(this,a,b);this.v.push(a);this.i||(this.i=!0,this.o(function(){return za(c)}))};function ya(a,b){if(!qa(b))throw new SyntaxError("The element name '"+b+"' is not valid.");if(W(a,b))throw Error("A custom element with name '"+(b+"' has already been defined."));if(a.A)throw Error("A custom element is already being defined.");}
|
|
38
|
+
function Aa(a,b,c){a.A=!0;var f;try{var d=c.prototype;if(!(d instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var e=function(m){var x=d[m];if(void 0!==x&&!(x instanceof Function))throw Error("The '"+m+"' callback must be a function.");return x};var g=e("connectedCallback");var h=e("disconnectedCallback");var k=e("adoptedCallback");var l=(f=e("attributeChangedCallback"))&&c.observedAttributes||[]}catch(m){throw m;}finally{a.A=!1}c={localName:b,
|
|
39
|
+
constructorFunction:c,connectedCallback:g,disconnectedCallback:h,adoptedCallback:k,attributeChangedCallback:f,observedAttributes:l,constructionStack:[]};a.u.set(b,c);a.C.set(c.constructorFunction,c);return c}Y.prototype.upgrade=function(a){V(this.h,a)};
|
|
40
|
+
function za(a){if(!1!==a.i){a.i=!1;for(var b=[],c=a.v,f=new Map,d=0;d<c.length;d++)f.set(c[d],[]);V(a.h,document,{upgrade:function(k){if(void 0===k.__CE_state){var l=k.localName,m=f.get(l);m?m.push(k):a.u.has(l)&&b.push(k)}}});for(d=0;d<b.length;d++)T(a.h,b[d]);for(d=0;d<c.length;d++){for(var e=c[d],g=f.get(e),h=0;h<g.length;h++)T(a.h,g[h]);(e=a.B.get(e))&&e.resolve(void 0)}c.length=0}}Y.prototype.get=function(a){if(a=W(this,a))return a.constructorFunction};
|
|
41
|
+
Y.prototype.whenDefined=function(a){if(!qa(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.B.get(a);if(b)return b.F;b=new va;this.B.set(a,b);var c=this.u.has(a)||this.s.has(a);a=-1===this.v.indexOf(a);c&&a&&b.resolve(void 0);return b.F};Y.prototype.polyfillWrapFlushCallback=function(a){this.D&&xa(this.D);var b=this.o;this.o=function(c){return a(function(){return b(c)})}};
|
|
42
|
+
function W(a,b){var c=a.u.get(b);if(c)return c;if(c=a.s.get(b)){a.s.delete(b);try{return Aa(a,b,c())}catch(f){X(f)}}}window.CustomElementRegistry=Y;Y.prototype.define=Y.prototype.define;Y.prototype.upgrade=Y.prototype.upgrade;Y.prototype.get=Y.prototype.get;Y.prototype.whenDefined=Y.prototype.whenDefined;Y.prototype.polyfillDefineLazy=Y.prototype.H;Y.prototype.polyfillWrapFlushCallback=Y.prototype.polyfillWrapFlushCallback;function Z(a,b,c){function f(d){return function(e){for(var g=[],h=0;h<arguments.length;++h)g[h]=arguments[h];h=[];for(var k=[],l=0;l<g.length;l++){var m=g[l];m instanceof Element&&J(m)&&k.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)h.push(m);else h.push(m)}d.apply(this,g);for(g=0;g<k.length;g++)U(a,k[g]);if(J(this))for(g=0;g<h.length;g++)k=h[g],k instanceof Element&&S(a,k)}}void 0!==c.prepend&&(b.prepend=f(c.prepend));void 0!==c.append&&(b.append=f(c.append))};function Ba(a){Document.prototype.createElement=function(b){return ua(a,this,b,null)};Document.prototype.importNode=function(b,c){b=aa.call(this,b,!!c);this.__CE_registry?V(a,b):Q(a,b);return b};Document.prototype.createElementNS=function(b,c){return ua(a,this,c,b)};Z(a,Document.prototype,{prepend:ba,append:ca})};function Ca(a){function b(f){return function(d){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];g=[];for(var h=[],k=0;k<e.length;k++){var l=e[k];l instanceof Element&&J(l)&&h.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)g.push(l);else g.push(l)}f.apply(this,e);for(e=0;e<h.length;e++)U(a,h[e]);if(J(this))for(e=0;e<g.length;e++)h=g[e],h instanceof Element&&S(a,h)}}var c=Element.prototype;void 0!==ia&&(c.before=b(ia));void 0!==ja&&(c.after=b(ja));void 0!==ka&&
|
|
53
43
|
(c.replaceWith=function(f){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];e=[];for(var g=[],h=0;h<d.length;h++){var k=d[h];k instanceof Element&&J(k)&&g.push(k);if(k instanceof DocumentFragment)for(k=k.firstChild;k;k=k.nextSibling)e.push(k);else e.push(k)}h=J(this);ka.apply(this,d);for(d=0;d<g.length;d++)U(a,g[d]);if(h)for(U(a,this),d=0;d<e.length;d++)g=e[d],g instanceof Element&&S(a,g)});void 0!==la&&(c.remove=function(){var f=J(this);la.call(this);f&&U(a,this)})};function Da(a){function b(d,e){Object.defineProperty(d,"innerHTML",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(g){var h=this,k=void 0;J(this)&&(k=[],P(a,this,function(x){x!==h&&k.push(x)}));e.set.call(this,g);if(k)for(var l=0;l<k.length;l++){var m=k[l];1===m.__CE_state&&a.disconnectedCallback(m)}this.ownerDocument.__CE_registry?V(a,this):Q(a,this);return g}})}function c(d,e){d.insertAdjacentElement=function(g,h){var k=J(h);g=e.call(this,g,h);k&&U(a,h);J(g)&&S(a,h);return g}}function f(d,
|
|
54
44
|
e){function g(h,k){for(var l=[];h!==k;h=h.nextSibling)l.push(h);for(k=0;k<l.length;k++)V(a,l[k])}d.insertAdjacentHTML=function(h,k){h=h.toLowerCase();if("beforebegin"===h){var l=this.previousSibling;e.call(this,h,k);g(l||this.parentNode.firstChild,this)}else if("afterbegin"===h)l=this.firstChild,e.call(this,h,k),g(this.firstChild,l);else if("beforeend"===h)l=this.lastChild,e.call(this,h,k),g(l||this.firstChild,null);else if("afterend"===h)l=this.nextSibling,e.call(this,h,k),g(this.nextSibling,l);
|
|
55
|
-
else throw new SyntaxError("The value provided ("+String(h)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");}}y&&(Element.prototype.attachShadow=function(d){d=y.call(this,d);if(a.
|
|
45
|
+
else throw new SyntaxError("The value provided ("+String(h)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");}}y&&(Element.prototype.attachShadow=function(d){d=y.call(this,d);if(a.j&&!d.__CE_patched){d.__CE_patched=!0;for(var e=0;e<a.m.length;e++)a.m[e](d)}return this.__CE_shadowRoot=d});z&&z.get?b(Element.prototype,z):I&&I.get?b(HTMLElement.prototype,I):ta(a,function(d){b(d,{enumerable:!0,configurable:!0,get:function(){return q.call(this,!0).innerHTML},set:function(e){var g=
|
|
56
46
|
"template"===this.localName,h=g?this.content:this,k=p.call(document,this.namespaceURI,this.localName);for(k.innerHTML=e;0<h.childNodes.length;)u.call(h,h.childNodes[0]);for(e=g?k.content:k;0<e.childNodes.length;)r.call(h,e.childNodes[0])}})});Element.prototype.setAttribute=function(d,e){if(1!==this.__CE_state)return B.call(this,d,e);var g=A.call(this,d);B.call(this,d,e);e=A.call(this,d);a.attributeChangedCallback(this,d,g,e,null)};Element.prototype.setAttributeNS=function(d,e,g){if(1!==this.__CE_state)return E.call(this,
|
|
57
47
|
d,e,g);var h=D.call(this,d,e);E.call(this,d,e,g);g=D.call(this,d,e);a.attributeChangedCallback(this,e,h,g,d)};Element.prototype.removeAttribute=function(d){if(1!==this.__CE_state)return C.call(this,d);var e=A.call(this,d);C.call(this,d);null!==e&&a.attributeChangedCallback(this,d,e,null,null)};Element.prototype.removeAttributeNS=function(d,e){if(1!==this.__CE_state)return F.call(this,d,e);var g=D.call(this,d,e);F.call(this,d,e);var h=D.call(this,d,e);g!==h&&a.attributeChangedCallback(this,e,g,h,d)};
|
|
58
|
-
na?c(HTMLElement.prototype,na):G&&c(Element.prototype,G);oa?f(HTMLElement.prototype,oa):H&&f(Element.prototype,H);Z(a,Element.prototype,{prepend:fa,append:ha});Ca(a)};var Ea={};function Fa(a){function b(){var c=this.constructor;var f=document.__CE_registry.
|
|
48
|
+
na?c(HTMLElement.prototype,na):G&&c(Element.prototype,G);oa?f(HTMLElement.prototype,oa):H&&f(Element.prototype,H);Z(a,Element.prototype,{prepend:fa,append:ha});Ca(a)};var Ea={};function Fa(a){function b(){var c=this.constructor;var f=document.__CE_registry.C.get(c);if(!f)throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`.");var d=f.constructionStack;if(0===d.length)return d=n.call(document,f.localName),Object.setPrototypeOf(d,c.prototype),d.__CE_state=1,d.__CE_definition=f,R(a,d),d;var e=d.length-1,g=d[e];if(g===Ea)throw Error("Failed to construct '"+f.localName+"': This element was already constructed.");d[e]=Ea;
|
|
59
49
|
Object.setPrototypeOf(g,c.prototype);R(a,g);return g}b.prototype=ma.prototype;Object.defineProperty(HTMLElement.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:b});window.HTMLElement=b};function Ga(a){function b(c,f){Object.defineProperty(c,"textContent",{enumerable:f.enumerable,configurable:!0,get:f.get,set:function(d){if(this.nodeType===Node.TEXT_NODE)f.set.call(this,d);else{var e=void 0;if(this.firstChild){var g=this.childNodes,h=g.length;if(0<h&&J(this)){e=Array(h);for(var k=0;k<h;k++)e[k]=g[k]}}f.set.call(this,d);if(e)for(d=0;d<e.length;d++)U(a,e[d])}}})}Node.prototype.insertBefore=function(c,f){if(c instanceof DocumentFragment){var d=K(c);c=t.call(this,c,f);if(J(this))for(f=
|
|
60
50
|
0;f<d.length;f++)S(a,d[f]);return c}d=c instanceof Element&&J(c);f=t.call(this,c,f);d&&U(a,c);J(this)&&S(a,c);return f};Node.prototype.appendChild=function(c){if(c instanceof DocumentFragment){var f=K(c);c=r.call(this,c);if(J(this))for(var d=0;d<f.length;d++)S(a,f[d]);return c}f=c instanceof Element&&J(c);d=r.call(this,c);f&&U(a,c);J(this)&&S(a,c);return d};Node.prototype.cloneNode=function(c){c=q.call(this,!!c);this.ownerDocument.__CE_registry?V(a,c):Q(a,c);return c};Node.prototype.removeChild=function(c){var f=
|
|
61
51
|
c instanceof Element&&J(c),d=u.call(this,c);f&&U(a,c);return d};Node.prototype.replaceChild=function(c,f){if(c instanceof DocumentFragment){var d=K(c);c=v.call(this,c,f);if(J(this))for(U(a,f),f=0;f<d.length;f++)S(a,d[f]);return c}d=c instanceof Element&&J(c);var e=v.call(this,c,f),g=J(this);g&&U(a,f);d&&U(a,c);g&&S(a,c);return e};w&&w.get?b(Node.prototype,w):sa(a,function(c){b(c,{enumerable:!0,configurable:!0,get:function(){for(var f=[],d=this.firstChild;d;d=d.nextSibling)d.nodeType!==Node.COMMENT_NODE&&
|