Skip to main content

Slot

Description:

  A Slot object that represents a single event slot with handlers.

Inherits from: Object.

add

Type: Function.

Description:

  Adds a new handler function to this slot.

Signature:

add: function(self: Slot, handler: function(...: any))

Parameters:

ParameterTypeDescription
handlerfunctionThe handler function to add.

set

Type: Function.

Description:

  Sets a new handler function for this slot, replacing any existing handlers.

Signature:

set: function(self: Slot, handler: function(...: any))

Parameters:

ParameterTypeDescription
handlerfunctionThe handler function to set.

remove

Type: Function.

Description:

  Removes a previously added handler function from this slot.

Signature:

remove: function(self: Slot, handler: function(...: any))

Parameters:

ParameterTypeDescription
handlerfunctionThe handler function to remove.

clear

Type: Function.

Description:

  Clears all handler functions from this slot.

Signature:

clear: function(self: Slot)