Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.spevent.remove

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library > SPEvent > remove

SPEvent.remove() method

Unregisters a callback that was registered using add().

Signature:

remove(observer: ISPEventObserver, eventHandler: (eventArgs: TEventArgs) => void): void;

Parameters

Parameter Type Description
observer ISPEventObserver This must be the same observer that was passed to the add() function.
eventHandler (eventArgs: TEventArgs) => void The event handler to remove; this must be the same object instance that was passed to the add() function.

Returns:

void

Remarks

If the event handler has already been removed, or if it was never added, then this method has no effect.

Clone this wiki locally