@progress/kendo-vue-editor
Version:
39 lines (38 loc) • 1.59 kB
TypeScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
/**
* Utilities for cleaning up ProseMirror and DOM resources to prevent memory leaks
*/
/**
* Recursively destroys all child nodes and removes attributes from a DOM node
* @param node - The DOM node to destroy
* @hidden
*/
export declare const destroyNode: (node: Node) => void;
/**
* Cleans up ProseMirror EditorView internal references and destroys the view
* This breaks circular references and releases DOM nodes held by ProseMirror
* @param view - The ProseMirror EditorView instance
* @returns The view's DOM element before it was nullified (for cleanup)
* @hidden
*/
export declare const cleanupAndDestroyProseMirrorView: (view: any) => Element | null;
/**
* Cleans up an iframe and its document to release memory
* @param iframe - The iframe element to clean up
* @param contentElement - Optional content element to destroy
* @hidden
*/
export declare const cleanupIframe: (iframe: HTMLIFrameElement, contentElement?: Element | null) => void;
/**
* Nullifies all properties on an object to break references
* Useful for breaking Vue's reactivity wrapper (markRaw)
* @param obj - The object to nullify
* @hidden
*/
export declare const nullifyObjectProperties: (obj: any) => void;