Releases: axa-ch-webhub-cloud/pattern-library
Releases · axa-ch-webhub-cloud/pattern-library
Support for built-in elements
A new version 2.0.1-beta.217
of the patterns-library has just been released 🎉 including breaking changes 💣 :
- Replaced existing polyfill by a battle-tested, feature-complete polyfill by WebReflection, namely
document-register-element
and@ungap/custom-elements-builtin
- All components can’t use the
constructor()
any more and should useinit()
, which is called with the proper contexts - see caveats V1 https://github.com/WebReflection/document-register-element#v1-caveat
Migration
- Replace your existing polyfill:
- remove old and broken polyfill
import '@webcomponents/webcomponentsjs/bundles/webcomponents-ce';
- and use shiny new working polyfill:
// better to load this only if it's needed import 'document-register-element/'; // ES2015 // load this for browsers which support customElements without builtin (webkit) import '@ungap/custom-elements-builtin';
- remove old and broken polyfill
- All
constructor
s need to be replaced byinit
, like so:->construcor(...) { super(...); }
init(...) {} super.init(...); }