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

@EisenbergEffect 

> I would want that API to return the HTMLUnknownElement that was created so that things like event handlers and intersection observers could be attached. This would also enable reading attributes on the element which could provide metadata used to control the application-specific load behavior.

I think this API should should only be called/resolved once, like `whenDefined()`, and _not_ get access to the instance. The first instance shouldn't be special in any way - its attributes shouldn't control how other instances are loaded. If you need to get a notice when any new instance is created, that should be a job for a MutationObserver.

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

Message ID: <WICG/webcomponents/issues/782/1524069350@github.com>

Received on Wednesday, 26 April 2023 21:31:10 UTC