Re: [w3c/webcomponents] [templates] Maybe each {{ ~ }} should be its own text node? (#683)

https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Template-Instantiation.md#46-nodetemplatepart-interface pretty much does that because we'd split text nodes inside `createInstance` (see https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Template-Instantiation.md#43-creating-template-parts) but we'd re-apply all the replacement nodes whenever any of the node template parts which belong to the same text node is updated.

I guess it's technically possible for a template content to have a contiguous text nodes so I should have devised the algorithm to treat them as one text node in the algorithm for `createInstance`. I wonder if there is any value in keeping the original split? If we had two text noes next to each other, we could either normalize them before splitting them again, or keep them separate.

-- 
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/683#issuecomment-341356507

Received on Thursday, 2 November 2017 08:57:28 UTC