Fix allowTemplateFromDomModule opt-in

This commit is contained in:
Kevin Schaaf
2018-07-23 10:18:50 -07:00
parent a199aa912e
commit 367273794d

View File

@@ -280,7 +280,9 @@ export const ElementMixin = dedupingMixin(base => {
*/ */
function getTemplateFromDomModule(is) { function getTemplateFromDomModule(is) {
let template = null; let template = null;
if (is && allowTemplateFromDomModule) { // Under strictTemplatePolicy in 3.x+, dom-module lookup is only allowed
// when opted-in via allowTemplateFromDomModule
if (is && (!strictTemplatePolicy || allowTemplateFromDomModule)) {
template = DomModule.import(is, 'template'); template = DomModule.import(is, 'template');
// Under strictTemplatePolicy, require any element with an `is` // Under strictTemplatePolicy, require any element with an `is`
// specified to have a dom-module // specified to have a dom-module