Re: [WICG/webcomponents] [idea] Make use of `observedAttributes` optional (#565)

> btw, @hmans a solution that works with `observedAttributes` would require some kind of runtime or build-time introspection on the type of object being wrapped. If class fields were present on the prototype in some way, you'd be able to do something, but instead maybe you can introspect the source.

Yeah, I've been thinking (a lot) about approaches like that, but with the Three.js, it's going to prove difficult. The nicest thing I can think of right now is to process its .d.ts files and generate something from them, but that would bind my library to a specific version of Three.js, and that's something I've been wanting to avoid.

There's another crazy idea where I have every element (eg. `<three-mesh>`) immediately replace itself with a different one (eg. `<three-smart-mesh>`) that is backed by a class that is created on the fly and outfitted with an `observableAttributes` filled with the known properties of the object `<three-mesh>` instantiated, but my library's approachability would probably suffer severely.

Someone's gonna come up with something. :b Thanks for getting back!

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

Received on Saturday, 16 January 2021 19:04:07 UTC