TBListener

TBListener

new TBListener()

Description:
  • Create a new instance of TBListener. Nothing happens yet until TBListener.start() has been called

Source:

Methods

clear(task) → {Boolean}

Description:
  • Clears a scheduled 'read' or 'write' task.

Source:
Parameters:
Name Type Description
task Object
Returns:

success

Type
Boolean

on(Name, Callback)

Description:
  • Register an event listener for a given event name for a callback.

Source:
Parameters:
Name Type Description
Name string

of event

Callback TBListener~listenerCallback

start()

Description:
  • Starts the TBListener instance by registering an event listener for reddit events

    A TBListenerLoaded event is fired when everything is ready.

Source:

stop()

Description:
  • Unregisters this instance's event listener

Source:

Type Definitions

listenerCallback(event, responseMessage)

Description:
  • Callback for a reddit event. The callback's this is event.target

Source:
This:
  • HTMLElement
Parameters:
Name Type Description
event CustomEvent
responseMessage string