Skip to content

Type Editor


Type Editor / @type-editor/dom-util / text-range / clearReusedRange

Function: clearReusedRange()

ts
function clearReusedRange(): void;

Defined in: text-range.ts:43

Clears the reused Range object.

This should be called when you need to ensure the cached Range is properly released, particularly when switching contexts or cleaning up resources.

Returns

void

Example

typescript
const range = textRange(textNode, 0, 5);
// ... use range ...
clearReusedRange(); // Clean up when done