Re: [w3c/webcomponents] Support /deep/ in static profile (bugzilla: 28591) (#78)

There is no need to watch for mutations. You just call [`.draw`](https://github.com/rijs/components/blob/master/src/index.js#L19) on the newly added element. For browsers that support the Custom Element lifecycle functions, the attachedCallback is pointed to the same function so it wouldn't be necessary (it's idempotent, so there's no harm if it's called multiple times anyway though).

The lifecycle callbacks are wrapped, which is what allows for the dynamic registry of components in the first place. The problem is not with the lifecycle callbacks however. It's when *something else* changes, like receiving new data/stylesheets/components from the server, and then you need to find the elements to rerender. If you are suggesting to use the {attached,detached}Callbacks to build some sort of internal map and keep track of every instance, then that is exactly what would be nice to avoid and rely on `querySelectorAll` for.

---
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-222858947

Received on Wednesday, 1 June 2016 00:17:56 UTC