Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/polkadot/api/base/Events.ts>Events#off

Package publishing for deno.land/x/polkadot
Go to Latest
method Events.prototype.off
import { Events } from "https://deno.land/x/polkadot@0.2.29/api/base/Events.ts";

Examples

const handler = (): void => {
 console.log('Connected !);
};

// Start listening
api.on('connected', handler);

// Stop listening
api.off('connected', handler);

Parameters

The type of event the callback was attached to. Available events are connected, disconnected, ready and error

handler: (...args: any[]) => any

The callback to unregister.