UNPKG

@progress/kendo-vue-editor

Version:
9 lines (8 loc) 1.46 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=t=>{for(;t.firstChild;){const e=t.firstChild;n(e),"removeChild"in t&&typeof t.removeChild=="function"&&t.removeChild(e)}if(t instanceof Element){const e=t.attributes;for(let o=e.length-1;o>=0;o--)t.removeAttribute(e[o].name)}},c=t=>{let e=null;return e=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=[]),e},u=(t,e)=>{var l,r,i,d;const o=t.contentDocument||((l=t.contentWindow)==null?void 0:l.document);o&&(e&&(n(e),e.parentNode&&e.parentNode.removeChild(e)),o.body&&(n(o.body),o.body.innerHTML=""),o.head&&(n(o.head),o.head.innerHTML="")),(r=t.contentWindow)==null||r.document.open(),(i=t.contentWindow)==null||i.document.write(""),(d=t.contentWindow)==null||d.document.close(),t.parentNode&&t.parentNode.removeChild(t),t.src="about:blank"},s=t=>{Object.keys(t).forEach(e=>{t[e]=null})};exports.cleanupAndDestroyProseMirrorView=c;exports.cleanupIframe=u;exports.destroyNode=n;exports.nullifyObjectProperties=s;