ui.Button.unlisten
Deletes callbacks.
Usage | Returns |
---|
Button.unlisten(idOrType) | |
Argument | Type | Details |
---|
this: ui.widget | ui.Widget | The ui.Widget instance. |
idOrType | String, optional | Either an ID returned by an onEventType() function during callback registration, an event type, or nothing. If an ID is passed, the corresponding callback is deleted. If an event type is passed, all callbacks for that type are deleted. If nothing is passed, all callbacks are deleted. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`unlisten()` removes registered callbacks from a UI widget."],["It accepts an optional argument, `idOrType`, which can be a specific callback ID, an event type to remove all callbacks of that type, or omitted to remove all callbacks."],["Using `unlisten()` provides a way to manage and clean up event listeners in UI widgets."]]],["The `Button.unlisten()` function deletes callbacks associated with a UI widget. It accepts an optional `idOrType` argument. If an ID is provided, it removes the specific callback linked to that ID. If an event type is given, all callbacks for that event type are removed. If no argument is provided, all callbacks for the widget are deleted. It does not return any value. The widget is the current ui.Widget instance.\n"]]