DiviAreaItem.addActionOnce(hook, callback, priority, context)

Same as DiviAreaItem.addAction() but the callback is unhooked again when the action is called the next time. This function ensures, that the callback is only invoked once.


hook string, required
The hook name, without an area-suffix.
callback function, required
The callback function.
priority int, optional
Hook priority.
Default: 10
context object, optional
The callback context.
Default: <code>window</code>


The function does not return anything.


No notes

Was this article helpful?

Related Articles

Need Support?

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