From 56b585f9deac272a09e31dfdfa1591a446f61452 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Tue, 17 Feb 2015 20:31:31 -0500 Subject: [PATCH] fix(view-compiler): elements with skipped content should not be traversed 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. --- src/view-compiler.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/view-compiler.js b/src/view-compiler.js index f6c1e941..46a85ee3 100644 --- a/src/view-compiler.js +++ b/src/view-compiler.js @@ -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);