Re: [WICG/webcomponents] Allow customElementRegistry definitions to persist across page loads (Issue #1033)

> It requires server configuration and resources.

Not necessary. If we deine imperative registry API as self-registering in current context, there would be no need for any server side special handling. Plain import JS module with payload like following suffice:
```js
// WCL
export defalut  function register( contextComponent, tagmap={} ){
    contextComponent.define(tagMap["my-custom-element"] || "my-custom-element", class MyCustomElement{ ... } )
    contextComponent.define(tagMap["my-another-element"] || "my-another-element", class MyLuckyElement{ ... } )
}
```
```js
// caller
import someLib from 'path/wcl.js'
// within component ...
someLib.register(this)
```
_disclaimer_: syntax is not exact, just an idea

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1033#issuecomment-1744169351
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1033/1744169351@github.com>

Received on Tuesday, 3 October 2023 04:26:03 UTC