refactor(render): don’t store DOM nodes but store strings for big ProtoViews.

Also inserts comment nodes before/after projected nodes so that text nodes don’t get merged when we serialize/deserialize them.

Closes #3356
First part of #3364
This commit is contained in:
Tobias Bosch
2015-07-29 17:41:09 -07:00
parent c08403935f
commit 0dbdd5cd3c
14 changed files with 250 additions and 40 deletions

View File

@ -77,6 +77,8 @@ export function stringifyElement(el): string {
if (!ListWrapper.contains(_singleTagWhitelist, tagName)) {
result += `</${tagName}>`;
}
} else if (DOM.isCommentNode(el)) {
result += `<!--${DOM.nodeValue(el)}-->`;
} else {
result += DOM.getText(el);
}