Trap

Trap

new Trap()

Source:

addon.tab.traps.* APIs

Extends

  • EventTarget

Members

(static, readonly) numMany :symbol

Source:

Symbol for accessing props of trapped objects.

Type:
  • symbol

(static, readonly) numOnce :symbol

Source:

Symbol for accessing props of trapped objects.

Type:
  • symbol

(static, readonly) onceValues :object.<string, *>

Source:

mapping for the Once objects trapped.

Type:
  • object.<string, *>

Methods

(static) addManyListener(trapName, fn)

Source:

Adds listener for Many objects trapped.

Parameters:
Name Type Description
trapName string

Trap name to listen to. Can be '*' for any.

fn function

callback passed to addEventListener.

(static) addOnceListener(trapName, fn)

Source:

Adds listener for Once objects trapped.

Parameters:
Name Type Description
trapName string

Trap name to listen to. Can be '*' for any.

fn function

callback passed to addEventListener.

(static) addPrototypeListener(trapName, fn)

Source:

Adds listener for prototype functions trapped.

Parameters:
Name Type Description
trapName string

Trap name to listen to. Can be '*' for any.

fn function

callback passed to addEventListener.

(static) removeManyListener(trapName, fn)

Source:

Removes listener for Many objects trapped.

Parameters:
Name Type Description
trapName string

Trap name to listen to. Can be '*' for any.

fn function

callback passed to removeEventListener.

(static) removeOnceListener(trapName, fn)

Source:

Removes listener for Once objects trapped.

Parameters:
Name Type Description
trapName string

Trap name to listen to. Can be '*' for any.

fn function

callback passed to removeEventListener.

(static) removePrototypeListener(trapName, fn)

Source:

Removes listener for prototype functions trapped.

Parameters:
Name Type Description
trapName string

Trap name to listen to. Can be '*' for any.

fn function

callback passed to removeEventListener.