DiviAreaItem.doAction()

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 – string, required
The action hook to call.
...params – mixed, optional
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

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us