mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
[skip ci] Highlight not compiling ce-adapter
This commit is contained in:
@@ -63,7 +63,9 @@ elements, etc.). Here's an example:
|
||||
## `custom-elements-es5-adapter.js`
|
||||
According to the spec, Custom Elements must be ES6 classes (https://html.spec.whatwg.org/multipage/scripting.html#custom-element-conformance). Since most projects need to support a wide range of browsers that don't necessary support ES6, it may make sense to compile your project to ES5. However, ES5-style custom element classes will **not** work with native Custom Elements because ES5-style classes cannot properly extend ES6 classes, like `HTMLElement`.
|
||||
|
||||
To work around this, load `custom-elements-es5-adapter.js` before declaring new Custom Elements. **The adapter must NOT be compiled.**
|
||||
To work around this, load `custom-elements-es5-adapter.js` before declaring new Custom Elements.
|
||||
|
||||
**The adapter must NOT be compiled.**
|
||||
|
||||
```html
|
||||
<!-- Load Custom Elements es5 adapter -->
|
||||
|
||||
Reference in New Issue
Block a user