Re: [w3c/webcomponents] Bulk property updates (#718)

For your example in particular, it seems like what would be better is the replaceAll() idea suggested at some point during https://github.com/whatwg/dom/issues/478. Although even using today's primitives it's easily replaced by

```js
function setChildNodes(node, elements) {
  node.innerText = "";
  node.append(...elements);
}
```

In general I share @caridy's concern that this is mixing together a lot of existing APIs, all of which work on very different concepts, into a big object that seems to be communicating some type of same-ness. I'd rather work on things like `replaceAll()` to address the specific issues you've found, e.g. I think `node.replaceChildren(...elements)` is nicer than `node.applyProperties({ childNodes: elements })`.

-- 
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/718#issuecomment-352598957

Received on Tuesday, 19 December 2017 00:14:33 UTC