Re: [w3c/webcomponents] Lazy Custom Element Definitions (#782)

It might be useful for granularity on what triggers these registers too, for example you might have a template that uses a component in a way that it's content has been pre-rendered anyway in which case you don't really need to load the javascript until an attribute changes (of course you can always trigger a register earlier if you want).

As such it might be worth just accepting any options from mutation observer init to the function:

```js
customElements.defineLazy('my-element', () => import("./MyElement.js"), { attributes: true, attributeFilter: [/* attributes I'm actually gonna change */] })`
```

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

Received on Tuesday, 2 April 2019 06:48:18 UTC