This commit is contained in:
2021-12-16 13:04:32 +03:00
parent b94cb967a6
commit 636cd65c78
21 changed files with 342 additions and 57 deletions
+12 -2
View File
@@ -131,9 +131,12 @@ __PluginManager__.register('support', function(module, exports, require, global)
if(isNode(html)) {
return html;
}
if(isString(html)) {
html = html.trim();
}
var nodeWrap = document.createElement('div');
nodeWrap.innerHTML = html;
var r = nodeWrap.firstElementChild;
var r = nodeWrap.firstChild;
r.remove();
return r;
}
@@ -141,8 +144,15 @@ __PluginManager__.register('support', function(module, exports, require, global)
if(isNodeList(html)) {
return html;
}
if(isString(html)) {
html = html.trim();
}
var nodeWrap = document.createElement('div');
nodeWrap.innerHTML = html;
if(isNode(html)) {
nodeWrap.append(html);
} else {
nodeWrap.innerHTML = html;
}
return nodeWrap.childNodes;
}
function setNodeData(node, key, value) {