browser No additional bytes of a framework for the user to download, parse and compile. WHATWG Spec https://html.spec.whatwg.org/multipage/custom- elements.html#custom-elements 7 / 33
{ "@linecorp/name-sticker-editor": "1.1.1" } Then in HTML Just like a regular HTML tag <script src="/name-sticker-editor/dist/name-sticker-editor.js"></scri <name-sticker-editor src="url/to/sticker/image" safe-area-color="#0003"> </name-sticker-editor> 18 / 33
<script> tag before using it Not flexible enough if users want to bundle themselves and use it directly in JS Lesson Learned Multiple builds: umd and esm <script src="/name-sticker-editor/dist/name-sticker-editor.js"></scri import { NameStickerEditor } from "node_modules/name-sticker-editor/i 23 / 33
don't support git+ssh Some other CI fail because they don't have permission to access to Github enterprise in https. "dependencies": { "loading-indicator": "git+ssh://git.repo.host:org/loading-indicat } "dependencies": { "loading-indicator": "https://git.repo.host/org/loading-indicator } 26 / 33
like React Components or Vue Components. We still have to do state management ourselves. Encapsulation custom elements in layers of layers just brought us more problems. 29 / 33
<range-and-color>, we have to explicitly propagate the change event. Because change events do not propagate out of shadow DOM. https://developers.google.com/web/fundamentals/web- components/shadowdom#events twoToneSlider.addEventListener("change", evt => { this.dispatchEvent(new CustomEvent(evt.type, { detail: evt.detail } }); 31 / 33