Skip to content

Commit

Permalink
fix(view-factory): unnecessary dom boundaries removed
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Aug 3, 2015
1 parent 49a5ad7 commit 77452a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/view-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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){
Expand All @@ -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);
}
Expand Down

0 comments on commit 77452a1

Please sign in to comment.