once

View as Markdown

once

  • once(event, fn)

Attaches an event handler to the specified event. The handler will fire only once.

Parameters

NameTypeDescription
eventstringName of the event. See the list of events.
fnFunctionAn event handler.