if (typeof setupData.source === 'string') {
var dialogElement = elCreate('div');
elAttr(dialogElement, 'id', setupData.id);
- dialogElement.innerHTML = setupData.source;
+ DomUtil.setInnerHtml(dialogElement, setupData.source);
setupData.source = document.createDocumentFragment();
setupData.source.appendChild(dialogElement);
if (typeof html === 'string') {
content = elCreate('div');
content.id = id;
- content.innerHTML = html;
+ DomUtil.setInnerHtml(content, html);
}
else if (html instanceof DocumentFragment) {
if (html.children[0].nodeName !== 'div' || html.childElementCount > 1) {
data.content.innerHTML = '';
var content = elCreate('div');
- content.innerHTML = html;
-
- var scripts = elBySelAll('script', content);
- for (var i = 0, length = scripts.length; i < length; i++) {
- var script = scripts[i];
- var newScript = elCreate('script');
- newScript.innerHTML = script.innerHTML;
- content.appendChild(newScript);
-
- elRemove(script);
- }
+ DomUtil.setInnerHtml(content, html);
data.content.appendChild(content);
}