Re: [whatwg/dom] Proposal: DOMChangeList (#270)

The TypeScript might have been too confusing. To reiterate, it's just there to illustrate the conceptual model. In an implementation, all `createElement()` has to do is return a pointer and store that plus arguments in an underlying opaque buffer. That pointer can then be passed to `setAttribute()` that will similarly store an instruction in the opaque buffer. None of that is validated ahead of time. It's only "validated" once the buffer is run (i.e., applied).

So basically, we're just creating an `ArrayBuffer` consisting of a set of pointers and DOM mutation operations (agree that we should add shadow roots). That should make transfer between threads cheap, should be significantly better than object creation for larger number of objects, etc.

Also, the handwaving about `WorkerNode` while simultaneously saying this is adding too much API surface is not helping. Any kind of worker API would need at least this much API surface. And then folks likely want the same API in workers and documents so they can reuse library code at which point we're back to a new set of primitives, which is exactly what @wycats has delivered here.

(Furthermore, having new primitives helps address the mismatch between the HTML parser and DOM APIs in terms of name validation.)

---
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/270#issuecomment-227338213

Received on Tuesday, 21 June 2016 04:34:23 UTC