From 77452a1712249229a82252c22abd4a8d9444c78e Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Mon, 3 Aug 2015 10:21:39 -0400 Subject: [PATCH] fix(view-factory): unnecessary dom boundaries removed --- src/html-behavior.js | 7 ++++--- src/view-factory.js | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/html-behavior.js b/src/html-behavior.js index ab9d17b2..f2b972f6 100644 --- a/src/html-behavior.js +++ b/src/html-behavior.js @@ -229,12 +229,13 @@ export class HtmlBehaviorResource { if(this.elementName !== null && element){ if(this.usesShadowDOM) { host = element.createShadowRoot(); + container.registerInstance(DOMBoundary, host); }else{ host = element; - } - if(instruction.anchorIsContainer){ - container.registerInstance(DOMBoundary, host); + if(this.targetShadowDOM){ + container.registerInstance(DOMBoundary, host); + } } } diff --git a/src/view-factory.js b/src/view-factory.js index 6f4bef7a..eb914716 100644 --- a/src/view-factory.js +++ b/src/view-factory.js @@ -3,7 +3,6 @@ import {View} from './view'; import {ViewSlot} from './view-slot'; import {ContentSelector} from './content-selector'; import {ViewResources} from './resource-registry'; -import {DOMBoundary} from './dom'; function elementContainerGet(key){ if(key === Element){ @@ -257,7 +256,6 @@ export class ViewFactory{ contentSelectors = [], containers = { root:container }, partReplacements = options.partReplacements, - domBoundary = container.get(DOMBoundary), i, ii, view, instructable, instruction; if(element !== null && this.surrogateInstruction !== null){ @@ -268,8 +266,6 @@ export class ViewFactory{ instructable = instructables[i]; instruction = instructions[instructable.getAttribute('au-target-id')]; - instructable.domBoundary = domBoundary; - applyInstructions(containers, executionContext, instructable, instruction, behaviors, bindings, children, contentSelectors, partReplacements, resources); }