- From: Ryosuke Niwa <notifications@github.com>
- Date: Tue, 31 May 2016 16:41:51 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc:
Received on Tuesday, 31 May 2016 23:42:21 UTC
> Now, since there may be relevant custom elements to update in the shadows of other custom elements (majority case), instead of `document.querySelectorAll(name)` a small utility is used to search across all shadow roots if the browser supports it. But anyone could add a new instance of a custom element dynamically to any shadow tree so you'd end up continuously monitoring mutations to every shadow tree. This is **extremely** inefficient. Just walking the entire composed tree to find all instances of a given custom element alone is too expensive. If you're concerned about tracking all instances of custom elements, wrapping custom elements' lifecycle callbacks might be a better approach (i.e. track lifecycle callbacks in your framework, and then delegate back to each custom element later). --- 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/78#issuecomment-222853452
Received on Tuesday, 31 May 2016 23:42:21 UTC