DiviAreaItem.doAction(hook, ...params)
Runs a JS action via DiviArea.doAction()
with the given hook name.
This function will call two hooks: One exactly as specified in the hook, and one with the Area-Key suffix. The actions are called in that order.
Params
hook
- The action hook to call.
...params
- Additional parameters to send to the callback handler. If no params are specified, then a reference to this
DiviAreaItem
is sent to the callback.
Returns
The filtered value.
Examples
// Invoke an area action.
area.doAction( 'show_area' );
// The above function is identical to the following code:
DiviArea.doAction( 'show_area', area );
DiviArea.doAction( 'show_area' + area.theKey(), area );
Notes
No notes