Skip to content

Commit

Permalink
Support selector parameter for render()
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Feb 25, 2015
1 parent 0af36bb commit 3e78994
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stanza/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
render: function(params) {
var htmlTemplate = Handlebars.compile(descriptor.templates[params.template]);
var htmlPartial = htmlTemplate(params.parameters);
$("main", element.shadowRoot).html(htmlPartial);
var selector = params.selector || "main";
$(selector, element.shadowRoot).html(htmlPartial);
}
};
}
Expand Down

0 comments on commit 3e78994

Please sign in to comment.