Skip to content

Commit

Permalink
Merge branch 'useshadowdom-noview' of https://github.com/Aaike/templa…
Browse files Browse the repository at this point in the history
…ting into Aaike-useshadowdom-noview
  • Loading branch information
EisenbergEffect committed May 6, 2015
2 parents 9d26ad1 + 66775dd commit 8ab754d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,22 @@ export class HtmlBehaviorResource {
if(element){
element.primaryBehavior = behaviorInstance;

if(behaviorInstance.view){
if(this.usesShadowDOM) {
host = element.createShadowRoot();
}else{
host = element;
if(this.usesShadowDOM) {
host = element.createShadowRoot();
}else{
host = element;
}

if(behaviorInstance.view){
if(!this.usesShadowDOM) {
if(instruction.contentFactory){
var contentView = instruction.contentFactory.create(container, null, contentSelectorFactoryOptions);

ContentSelector.applySelectors(
contentView,
behaviorInstance.view.contentSelectors,
(contentSelector, group) => contentSelector.add(group)
);
);

behaviorInstance.contentView = contentView;
}
Expand Down

0 comments on commit 8ab754d

Please sign in to comment.