Skip to content

Commit

Permalink
fix(view-compiler): elements with skipped content should not be trave…
Browse files Browse the repository at this point in the history
…rsed

This commit fixes issue #21. When a custom element indicates that its
content should not be processed, the view compiled will not traverse
the child nodes at all. Full responsibility is passed to the
implementor of the custom element.
  • Loading branch information
EisenbergEffect committed Feb 18, 2015
1 parent a1a90ce commit 56b585f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/view-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ export class ViewCompiler {
});
}

if(elementInstruction && elementInstruction.type.skipContentProcessing){
return node.nextSibling;
}

var currentChild = node.firstChild;
while (currentChild) {
currentChild = this.compileNode(currentChild, resources, instructions, node, injectorId || parentInjectorId, targetLightDOM);
Expand Down

0 comments on commit 56b585f

Please sign in to comment.