- From: Hendrik Mans <notifications@github.com>
- Date: Fri, 05 Feb 2021 00:50:20 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 5 February 2021 08:50:32 UTC
A quick update from my side on how I've been tackling this with [three-elements](https://github.com/hmans/three-elements): After using MutationObserver for a while, I eventually removed it, and instead went with overloading `setAttribute` in the base class for all the elements my library is defining. This is working great with all of the major intended use cases for the library; the only thing that no longer works with this is reacting to manual changes made to the DOM through the browser's devtools. I've had at least one user of the library tell me that this is a feature they really liked and wanted to see return, so I implemented an _opt-in_ MutationObserver mode that also prints a console warning about its performance impact. All in all, things are plenty good now, but of course if there is a future where I can whitelist _all_ attributes without working around things, I want in. :-) The biggest caveat right now is that there are so many nice web component authoring libraries out there that I would theoretically like to implement in my library, but only few of them allow me to hook into their underlying classes so I can apply my setAttribute trickery. -- 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-773889707
Received on Friday, 5 February 2021 08:50:32 UTC