Skip to content

Instantly share code, notes, and snippets.

@WebReflection
Last active September 7, 2025 16:53
Show Gist options
  • Select an option

  • Save WebReflection/ae3451c17c5e882bbc7f0714c14eefcd to your computer and use it in GitHub Desktop.

Select an option

Save WebReflection/ae3451c17c5e882bbc7f0714c14eefcd to your computer and use it in GitHub Desktop.

Revisions

  1. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -98,7 +98,7 @@ If a *lit-element* is *not bundled*, the *import* should have an absolute *CDN*

    In this case, the minimal component size *won't* include the library itself but each component will require an `import` capable browser (no IE11, no old Edge), plus a network request, either to download once the library, or to grab it from the network cache.

    However, most deployed components do include *lit-element* itself, until the day *lit-element* will use the same approach *uce* is using, so that components will be decoupled from the libarry itself, which can export all its namespace through the registerd Custom Element class.
    However, most deployed components do include *lit-element* itself, until the day *lit-element* will use the same approach *uce* is using, so that components will be decoupled from the library itself, which can export all its namespace through the registerd Custom Element class.

    Alternatively, *lit-element* could be pre-bundled and leak on the global `window` context, so that components can rely on its presence:
    ```js
  2. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ A very simple comparison table between these two libraries.
    | friendly syntax `*****` |||
    | builtin extends |||

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) ([1.3k](https://unpkg.com/[email protected]/min.js)) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme) ([19.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-sd.js)), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) ([1.3k](https://unpkg.com/[email protected]/min.js)) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme) ([19.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-sd.js)), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but, as I am writing today, no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`. Please [read more](https://gist.github.com/WebReflection/ae3451c17c5e882bbc7f0714c14eefcd#about-the-minimal-component-size) if this part is not clear.

  3. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ A very simple comparison table between these two libraries.

    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even richer *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets, and *yet*, ShadowDOM is not *SSR* friendly, so choose carefully here.

    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its presence as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* requires that each component bundles the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*.
    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its presence as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* components usually bundle the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*. Please [read more](https://gist.github.com/WebReflection/ae3451c17c5e882bbc7f0714c14eefcd#about-the-minimal-component-size) if this part is not clear.

    `*****` in *uce* interpolations can be just plain *JS*, no need to import, know, or learn, any *repeater* or specialized syntax/feature.

  4. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -63,7 +63,7 @@ customElements.whenDefined('uce-lib').then(
    }
    );
    ```
    No `import`, no `require`, no external dependencies needed, the size of the library is completely irrelevant because it's exported through its own namespace.
    No `import`, no `require`, no external dependencies needed, the size of the library is completely irrelevant because it's exported through its own namespace defined as `uce-lib` Custom Element.

    In *lit-element*, the structure of the page will be similar:
    ```html
  5. WebReflection revised this gist Oct 15, 2020. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -38,10 +38,10 @@ A Web page that uses *uce* can have this structure:
    <!doctype html>
    <html>
    <head>
    <script defer src="/js/uce.js"></script>
    <script defer src="js/components/component-a.js"></script>
    <script defer src="js/components/component-b.js"></script>
    <script defer src="js/components/component-c.js"></script>
    <script async src="/js/uce.js"></script>
    <script async src="js/components/component-a.js"></script>
    <script async src="js/components/component-b.js"></script>
    <script async src="js/components/component-c.js"></script>
    </head>
    <body>
    <component-a>content</component-a>
    @@ -70,9 +70,9 @@ In *lit-element*, the structure of the page will be similar:
    <!doctype html>
    <html>
    <head>
    <script defer src="js/components/component-a.js"></script>
    <script defer src="js/components/component-b.js"></script>
    <script defer src="js/components/component-c.js"></script>
    <script async src="js/components/component-a.js"></script>
    <script async src="js/components/component-b.js"></script>
    <script async src="js/components/component-c.js"></script>
    </head>
    <body>
    <component-a>content</component-a>
  6. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ A very simple comparison table between these two libraries.

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) ([1.3k](https://unpkg.com/[email protected]/min.js)) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme) ([19.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-sd.js)), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.
    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`. Please [read more](https://gist.github.com/WebReflection/ae3451c17c5e882bbc7f0714c14eefcd#about-the-minimal-component-size) if this part is not clear.

    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even richer *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets, and *yet*, ShadowDOM is not *SSR* friendly, so choose carefully here.

  7. WebReflection revised this gist Oct 15, 2020. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -98,4 +98,13 @@ If a *lit-element* is *not bundled*, the *import* should have an absolute *CDN*

    In this case, the minimal component size *won't* include the library itself but each component will require an `import` capable browser (no IE11, no old Edge), plus a network request, either to download once the library, or to grab it from the network cache.

    However, most deployed components do include *lit-element* itself, until the day *lit-element* will use the same approach *uce* is using, so that components will be decoupled from the libarry itself, which can export all its namespace through the registerd Custom Element class.
    However, most deployed components do include *lit-element* itself, until the day *lit-element* will use the same approach *uce* is using, so that components will be decoupled from the libarry itself, which can export all its namespace through the registerd Custom Element class.

    Alternatively, *lit-element* could be pre-bundled and leak on the global `window` context, so that components can rely on its presence:
    ```js
    const { LitElement } = window.litElement;
    customElements.define('component-a', class extends LitElement {
    // ...
    });
    ```
    However, this code would break if the global `litElement` namespace is not already available, while *uce* components will never break, even if they are evaluated *before* the *uce* library is included in the page.
  8. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -96,6 +96,6 @@ If a *lit-element* component is *bundled*, so that it can be deployed anywhere,

    If a *lit-element* is *not bundled*, the *import* should have an absolute *CDN* url so that it can be deployed anywhere a third party *CDN* dependency is acceptable.

    In this case, the minimal component size *won't* include the library itself but each component will require a network request, either to download once the library, or to grab it from the network cache.
    In this case, the minimal component size *won't* include the library itself but each component will require an `import` capable browser (no IE11, no old Edge), plus a network request, either to download once the library, or to grab it from the network cache.

    However, most deployed components do include *lit-element* itself, until the day *lit-element* will use the same approach *uce* is using, so that components will be decoupled from the libarry itself, which can export all its namespace through the registerd Custom Element class.
  9. WebReflection revised this gist Oct 15, 2020. 1 changed file with 73 additions and 2 deletions.
    75 changes: 73 additions & 2 deletions uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ A very simple comparison table between these two libraries.
    | language | JS w/ TS definition | TS w/ JS transpilation |
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | [2.1k](https://unpkg.com/@ungap/[email protected]/min.js) w/ builtin extends | [5.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-ce.js) CE w/out builtin or [31.7k](https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js) w/ SD |
    | minimal components size `**` | 73b plain | 30k+ plain |
    | minimal components size `**` | 73b plain | 92b plain up to 30k+ plain |
    | declaration | object literal w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
    @@ -27,4 +27,75 @@ A very simple comparison table between these two libraries.

    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its presence as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* requires that each component bundles the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*.

    `*****` in *uce* interpolations can be just plain *JS*, no need to import, know, or learn, any *repeater* or specialized syntax/feature.
    `*****` in *uce* interpolations can be just plain *JS*, no need to import, know, or learn, any *repeater* or specialized syntax/feature.

    - - -

    ## About the minimal component size

    A Web page that uses *uce* can have this structure:
    ```html
    <!doctype html>
    <html>
    <head>
    <script defer src="/js/uce.js"></script>
    <script defer src="js/components/component-a.js"></script>
    <script defer src="js/components/component-b.js"></script>
    <script defer src="js/components/component-c.js"></script>
    </head>
    <body>
    <component-a>content</component-a>
    <component-b>content</component-b>
    <component-c>content</component-c>
    </body>
    </html>
    ```

    All components can be developed without using any toolchain.
    ```js
    customElements.whenDefined('uce-lib').then(
    function (uce) {
    uce.define('component-a', {
    connected() {
    console.log('I am alive!');
    }
    });
    }
    );
    ```
    No `import`, no `require`, no external dependencies needed, the size of the library is completely irrelevant because it's exported through its own namespace.

    In *lit-element*, the structure of the page will be similar:
    ```html
    <!doctype html>
    <html>
    <head>
    <script defer src="js/components/component-a.js"></script>
    <script defer src="js/components/component-b.js"></script>
    <script defer src="js/components/component-c.js"></script>
    </head>
    <body>
    <component-a>content</component-a>
    <component-b>content</component-b>
    <component-c>content</component-c>
    </body>
    </html>
    ```

    However, accordingly with the way components are *currently* written, each of them requires either a toolchain, or an import, so that the library can be used.
    ```js
    import { LitElement } from 'lit-element';
    customElements.define('component-a', class extends LitElement {
    connectedCallback() {
    console.log('I am alive');
    }
    });
    ```

    If a *lit-element* component is *bundled*, so that it can be deployed anywhere, the *LitElement* part of the library will be bundled too.

    If a *lit-element* is *not bundled*, the *import* should have an absolute *CDN* url so that it can be deployed anywhere a third party *CDN* dependency is acceptable.

    In this case, the minimal component size *won't* include the library itself but each component will require a network request, either to download once the library, or to grab it from the network cache.

    However, most deployed components do include *lit-element* itself, until the day *lit-element* will use the same approach *uce* is using, so that components will be decoupled from the libarry itself, which can export all its namespace through the registerd Custom Element class.
  10. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ A very simple comparison table between these two libraries.
    | language | JS w/ TS definition | TS w/ JS transpilation |
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | [2.1k](https://unpkg.com/@ungap/[email protected]/min.js) w/ builtin extends | [5.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-ce.js) CE w/out builtin or [31.7k](https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js) w/ SD |
    | minimal components size `**` | 73b | 30k+ |
    | minimal components size `**` | 73b plain | 30k+ plain |
    | declaration | object literal w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
  11. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ A very simple comparison table between these two libraries.
    | friendly syntax `*****` |||
    | builtin extends |||

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) [1.3k](https://unpkg.com/[email protected]/min.js) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme) [19.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-sd.js), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) ([1.3k](https://unpkg.com/[email protected]/min.js)) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme) ([19.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-sd.js)), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

  12. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ A very simple comparison table between these two libraries.
    | friendly syntax `*****` |||
    | builtin extends |||

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) [1.3k](https://unpkg.com/[email protected]/min.js) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme) [19.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-sd.js), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

  13. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ A very simple comparison table between these two libraries.
    | license | ISC (simplified MIT) | BSD-3-Clause License |
    | language | JS w/ TS definition | TS w/ JS transpilation |
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k w/ builtin extends | 5.2k CE w/out builtin or 68.3k w/ SD |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | [2.1k](https://unpkg.com/@ungap/[email protected]/min.js) w/ builtin extends | [5.2k](https://unpkg.com/@webcomponents/[email protected]/bundles/webcomponents-ce.js) CE w/out builtin or [31.7k](https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js) w/ SD |
    | minimal components size `**` | 73b | 30k+ |
    | declaration | object literal w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
  14. WebReflection revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ A very simple comparison table between these two libraries.
    | license | ISC (simplified MIT) | BSD-3-Clause License |
    | language | JS w/ TS definition | TS w/ JS transpilation |
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k | 5.2k CE w/out builtin or 68.3k w/ SD |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k w/ builtin extends | 5.2k CE w/out builtin or 68.3k w/ SD |
    | minimal components size `**` | 73b | 30k+ |
    | declaration | object literal w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
  15. WebReflection revised this gist Oct 15, 2020. 1 changed file with 12 additions and 12 deletions.
    24 changes: 12 additions & 12 deletions uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -3,19 +3,19 @@
    A very simple comparison table between these two libraries.

    | | uce | lit-element |
    | --------------------------------------------- |:--------------------------:|:-----------------------------------:|
    | version | 1.11.9 | 2.4.0 |
    | license | ISC (simplified MIT) | BSD-3-Clause License |
    | language | JS w/ TS definition | TS w/ JS transpilation |
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k | 68.3k |
    | minimal components size `**` | 73b | 30k+ |
    | declaration | object literal w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
    | keyed & non-keyed ability |||
    | --------------------------------------------- |:--------------------------:|:------------------------------------:|
    | version | 1.11.9 | 2.4.0 |
    | license | ISC (simplified MIT) | BSD-3-Clause License |
    | language | JS w/ TS definition | TS w/ JS transpilation |
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k | 5.2k CE w/out builtin or 68.3k w/ SD |
    | minimal components size `**` | 73b | 30k+ |
    | declaration | object literal w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
    | keyed & non-keyed ability || |
    | SSR `***` |||
    | distributable components `****` || **⚠️** |
    | distributable components `****` || **⚠️** |
    | friendly syntax `*****` |||
    | builtin extends |||

  16. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ A very simple comparison table between these two libraries.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even reacher *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets, and *yet*, ShadowDOM is not *SSR* friendly, so choose carefully here.
    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even richer *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets, and *yet*, ShadowDOM is not *SSR* friendly, so choose carefully here.

    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its presence as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* requires that each component bundles the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*.

  17. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ A very simple comparison table between these two libraries.
    | friendly syntax `*****` |||
    | builtin extends |||

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can be optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

  18. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ A very simple comparison table between these two libraries.
    | friendly syntax `*****` |||
    | builtin extends |||

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too for IE or Safari, but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends for IE and Safari too, but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

  19. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ A very simple comparison table between these two libraries.
    | friendly syntax `*****` |||
    | builtin extends |||

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too for IE or Safari, but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

  20. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ A very simple comparison table between these two libraries.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even reacher *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets.
    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even reacher *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets, and *yet*, ShadowDOM is not *SSR* friendly, so choose carefully here.

    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its presence as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* requires that each component bundles the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*.

  21. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ A very simple comparison table between these two libraries.
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k | 68.3k |
    | minimal components size `**` | 73b | 30k+ |
    | declaration | object literals w/ extends | the base class is `LitElement` only |
    | declaration | object literal w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
    | keyed & non-keyed ability |||
  22. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ A very simple comparison table between these two libraries.
    | language | JS w/ TS definition | TS w/ JS transpilation |
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k | 68.3k |
    | minimal components size `**` | 73 plain chars | 30K+ plain chars |
    | minimal components size `**` | 73b | 30k+ |
    | declaration | object literals w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
  23. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ A very simple comparison table between these two libraries.
    | size <sup><sub>( brotli )</sub></sup> | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
    | polyfill <sup><sub>( brotli )</sub></sup> `*` | 2.1k | 68.3k |
    | minimal components size `**` | 73 plain chars | 30K+ plain chars |
    | declaration | object literals w/ extends | the class base is `LitElement` only |
    | declaration | object literals w/ extends | the base class is `LitElement` only |
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
    | keyed & non-keyed ability |||
  24. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ A very simple comparison table between these two libraries.
    | SSR `***` |||
    | distributable components `****` || **⚠️** |
    | friendly syntax `*****` |||
    | builtin extends || |
    | builtin extends || |

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

  25. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ A very simple comparison table between these two libraries.
    | keyed & non-keyed ability |||
    | SSR `***` |||
    | distributable components `****` || **⚠️** |
    | friendly syntax `*****` || |
    | friendly syntax `*****` || |
    | builtin extends || |

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
  26. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ A very simple comparison table between these two libraries.
    | friendly syntax `*****` || |
    | builtin extends || |

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* optional polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

  27. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # [uce](github.com/WebReflection/uce#readme) vs [lit-element](https://github.com/Polymer/lit-element#readme)
    # [uce](https://github.com/WebReflection/uce#readme) vs [lit-element](https://github.com/Polymer/lit-element#readme)

    A very simple comparison table between these two libraries.

  28. WebReflection revised this gist Oct 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,6 @@ A very simple comparison table between these two libraries.

    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even reacher *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets.

    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its present as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* requires that each component bundles the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*.
    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its presence as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* requires that each component bundles the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*.

    `*****` in *uce* interpolations can be just plain *JS*, no need to import, know, or learn, any *repeater* or specialized syntax/feature.
  29. WebReflection revised this gist Oct 14, 2020. 1 changed file with 7 additions and 5 deletions.
    12 changes: 7 additions & 5 deletions uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -14,15 +14,17 @@ A very simple comparison table between these two libraries.
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
    | keyed & non-keyed ability |||
    | SSR `****` |||
    | friendly syntax `***` || |
    | SSR `***` |||
    | distributable components `****` || **⚠️** |
    | friendly syntax `*****` || |
    | builtin extends || |
    | distributable components || |

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.

    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even reacher *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring the heavy polyfill for it if older *Edge*, *IE11*, or mobile browsers, are part of the targets.
    `***` in *uce* the usage of *ShadowDOM* is not really necessary, neither encouraged, hence its components work out of the box even landed as *SSR*. See [uce-template](https://github.com/WebReflection/uce-template#readme) for an even reacher *SSR* compatible experience. In *lit-element*, the usage of *ShadowDOM* is both encouraged and demoed all over, requiring its heavy polyfill if older browsers such as *Edge*, *IE11*, or legacy Mobile, are part of the targets.

    `****` in *uce* interpolations can be just plain *JS*, no need to import, know, or learn, any *repeater* or specialized features.
    `****` in *uce* components can be distributed without carrying the library with them, thanks to [its present as customElements library](https://medium.com/@WebReflection/some-web-components-hint-75dce339ac6b), while *lit-element* requires that each component bundles the library in order to work, adding unnecessary bloat when components are published as stand-alone. That is: *uce* libarry size is *O(1)*, while in *lit-element* it's currently *O(n)*.

    `*****` in *uce* interpolations can be just plain *JS*, no need to import, know, or learn, any *repeater* or specialized syntax/feature.
  30. WebReflection revised this gist Oct 14, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions uce-vs-lit-element.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # uce vs lit-element
    # [uce](github.com/WebReflection/uce#readme) vs [lit-element](https://github.com/Polymer/lit-element#readme)

    A very simple comparison table between these two libraries.

    @@ -14,12 +14,12 @@ A very simple comparison table between these two libraries.
    | extends-ability | mixins | classes |
    | tooling-free || `import` + `@decorators` |
    | keyed & non-keyed ability |||
    | SSR `****` || ? |
    | SSR `****` || |
    | friendly syntax `***` || |
    | builtin extends || |
    | distributable components || |

    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, while *lit-element* polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.
    `*` *uce* optional polyfill is [@ungap/custom-elements](https://github.com/ungap/custom-elements#readme) which provides builtin extends too but no ShadowDOM, which can optionally added via [attachshadow](https://github.com/WebReflection/attachshadow#readme) or [ShadyDOM](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom#readme), while *lit-element* polyfill is [@webcomponents/webcomponentsjs](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#readme) which provides Shadow DOM but no builtin extends.

    `**` in *uce* the minimal custom element is `customElements.whenDefined('uce-lib').then(({define})=>define('a-b',{}))`, while in *lit-element* it's `import{LitElement}from'lit-element';customElements.define('a-b',class extends LitElement{})`.