Re: [webcomponents] Replace attached/detached callbacks with insertedIntoDocument/removedFromDocument (#362)

I think we can have the `document` into which the custom element was inserted or from which it was removed as the first argument.

Here's more concrete discussion that summarizes the discussion thus far:

- `connectedCallback`: Unless specified otherwise, this callback must be [enqueued](https://w3c.github.io/webcomponents/spec/custom/#dfn-enqueue-lifecycle-callback) when a node is [inserted](https://dom.spec.whatwg.org/#concept-node-insert) into a <var>parent</var> [in a composed document](http://w3c.github.io/webcomponents/spec/shadow/#dfn-in-a-composed-document) (after step 7 in [insert](https://dom.spec.whatwg.org/#concept-node-insert)) and add the [document](https://dom.spec.whatwg.org/#document) node which is an [inclusive composed ancestor](http://w3c.github.io/webcomponents/spec/shadow/#dfn-inclusive-composed-ancestor) of <var>parent</var> to the queue item.

- `disconnectedCallback`: Unless specified otherwise, this callback must be [enqueued](https://w3c.github.io/webcomponents/spec/custom/#dfn-enqueue-lifecycle-callback) when a node is [removed](https://dom.spec.whatwg.org/#concept-node-remove) from a <var>parent</var> [in a composed document](http://w3c.github.io/webcomponents/spec/shadow/#dfn-in-a-composed-document) (after step 12 in [remove](https://dom.spec.whatwg.org/#concept-node-remove)) and add the [document](https://dom.spec.whatwg.org/#document) node which is an [inclusive composed ancestor](http://w3c.github.io/webcomponents/spec/shadow/#dfn-inclusive-composed-ancestor) of <var>parent</var> to the queue item.



---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/362#issuecomment-193004846

Received on Sunday, 6 March 2016 21:59:55 UTC