Permalink
Browse files

feat(html-behavior): enable processContent via custom attributes

  • Loading branch information...
EisenbergEffect committed Oct 15, 2017
1 parent c08db20 commit 7096e66597402b4e03a39adb5ec0f32a0c7c72ae
Showing with 6 additions and 1 deletion.
  1. +2 −0 src/html-behavior.js
  2. +4 −1 src/view-compiler.js
View
@@ -288,6 +288,8 @@ export class HtmlBehaviorResource {
} else {
instruction.skipContentProcessing = true;
}
} else if (!this.processContent(compiler, resources, node, instruction)) {
instruction.skipContentProcessing = true;
}
return node;
View
@@ -422,13 +422,16 @@ export class ViewCompiler {
auTargetID = makeIntoInstructionTarget(node);
instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction);
} else {
let skipContentProcessing = false;
if (expressions.length || behaviorInstructions.length) {
injectorId = behaviorInstructions.length ? getNextInjectorId() : false;
for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {
instruction = behaviorInstructions[i];
instruction.type.compile(this, resources, node, instruction, parentNode);
providers.push(instruction.type.target);
skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing;
}
for (i = 0, ii = expressions.length; i < ii; ++i) {
@@ -449,7 +452,7 @@ export class ViewCompiler {
);
}
if (elementInstruction && elementInstruction.skipContentProcessing) {
if (skipContentProcessing) {
return node.nextSibling;
}

0 comments on commit 7096e66

Please sign in to comment.