@progress/kendo-vue-editor
Version:
36 lines (35 loc) • 1.61 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
const e = (t) => {
for (; t.firstChild; ) {
const o = t.firstChild;
e(o), "removeChild" in t && typeof t.removeChild == "function" && t.removeChild(o);
}
if (t instanceof Element) {
const o = t.attributes;
for (let n = o.length - 1; n >= 0; n--)
t.removeAttribute(o[n].name);
}
}, c = (t) => {
let o = null;
return o = t.dom, t.destroy(), t.state = null, t.dispatch = null, t.updateState = null, t.dom = null, t.docView = null, t.input = null, t.pluginViews && (t.pluginViews = []), o;
}, u = (t, o) => {
var l, i, d, r;
const n = t.contentDocument || ((l = t.contentWindow) == null ? void 0 : l.document);
n && (o && (e(o), o.parentNode && o.parentNode.removeChild(o)), n.body && (e(n.body), n.body.innerHTML = ""), n.head && (e(n.head), n.head.innerHTML = "")), (i = t.contentWindow) == null || i.document.open(), (d = t.contentWindow) == null || d.document.write(""), (r = t.contentWindow) == null || r.document.close(), t.parentNode && t.parentNode.removeChild(t), t.src = "about:blank";
}, s = (t) => {
Object.keys(t).forEach((o) => {
t[o] = null;
});
};
export {
c as cleanupAndDestroyProseMirrorView,
u as cleanupIframe,
e as destroyNode,
s as nullifyObjectProperties
};