@endorphinjs/template-runtime
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -6,3 +6,3 @@ import { Injector, Block } from './injector'; | ||
get: GetMount; | ||
code: any; | ||
code: string | Node | null; | ||
slotName: string; | ||
@@ -9,0 +9,0 @@ } |
@@ -1667,6 +1667,15 @@ /** | ||
const { cssScope } = host.componentModel.definition; | ||
if (code && code.nodeType) { | ||
if (isNode(code)) { | ||
// Insert as DOM element | ||
cssScope && scopeDOM(code, cssScope); | ||
insert(injector, code, slotName); | ||
if (code.nodeType === code.DOCUMENT_FRAGMENT_NODE) { | ||
// Insert document fragment contents separately to properly maintain | ||
// list of inserted elements | ||
while (code.firstChild) { | ||
insert(injector, code.firstChild, slotName); | ||
} | ||
} | ||
else { | ||
insert(injector, code, slotName); | ||
} | ||
} | ||
@@ -1696,2 +1705,5 @@ else { | ||
} | ||
function isNode(obj) { | ||
return obj && obj.nodeType; | ||
} | ||
@@ -1698,0 +1710,0 @@ function getPartial(host, name, componentPartials) { |
{ | ||
"name": "@endorphinjs/template-runtime", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "EndorphinJS template runtime, embedded with template bundles", | ||
@@ -52,3 +52,3 @@ "main": "./dist/runtime.cjs.js", | ||
}, | ||
"gitHead": "834344db094c7b60dc593899060bdc25eca80172" | ||
"gitHead": "0375223af81375ab7a948560fb9cccd4be994457" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
445848
5303