Re: [whatwg/dom] "Remove a node from a parent" reaction callback stuff needs to be conditional on the node being connected before the operation (#773)

All browsers (but Servo, I expect), log `disconnected` only once in this test-case:

```html
<!doctype html>
<div id="custom-element-parent">
  <custom-element></custom-element>
</div>
<script>
customElements.define('custom-element', class extends HTMLElement {
  disconnectedCallback() {
    console.log("disconnected");
  }
});
onload = function() {
  const p = document.getElementById("custom-element-parent");
  p.remove();
  setTimeout(() => p.firstElementChild.remove(), 100);
}
</script>
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/773#issuecomment-508728708

Received on Friday, 5 July 2019 11:29:14 UTC