--- category: Sensors --- # onElementRemoval Fires when the element or any element containing it is removed. ## Usage ```vue {13} ``` ## Type Declarations ```ts export interface OnElementRemovalOptions extends ConfigurableWindow, ConfigurableDocumentOrShadowRoot, WatchOptionsBase {} /** * Fires when the element or any element containing it is removed. * * @param target * @param callback * @param options */ export declare function onElementRemoval( target: MaybeElementRef, callback: (mutationRecords: MutationRecord[]) => void, options?: OnElementRemovalOptions, ): Fn ```