Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Manages callbacks that fire before an item is used.
Methods
subscribe
subscribe(callback: (arg0: ItemUseBeforeEvent) => void): (arg0: ItemUseBeforeEvent) => void
Adds a callback that will be called before an item is used.
Parameters
- callback: (arg0: ItemUseBeforeEvent) => void This closure is called with restricted-execution privilege.
Returns (arg0: ItemUseBeforeEvent) => void The returned closure is called with restricted-execution privilege.
Notes:
- This function can't be called in restricted-execution mode.
- This function can be called in early-execution mode.
unsubscribe
unsubscribe(callback: (arg0: ItemUseBeforeEvent) => void): void
Removes a callback from being called before an item is used.
Parameters
- callback: (arg0: ItemUseBeforeEvent) => void This closure is called with restricted-execution privilege.
Notes:
- This function can't be called in restricted-execution mode.
- This function can be called in early-execution mode.