onCLI([callback], remove)
Class: SwingUI.
Description:
Registers, unregisters and retrieves event handler that receive STDIN data sent by command line interface (CLI).
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
function |
Function to handle the event, |
|
|
|
boolean |
false |
Removed the callback from this event |
Returns:
Returns this instance of SwingUI class.
Type: SwingUI
Examples:
Registering an event handler to receive CLI input:
ui.onCLI(e => {console.log(`Received: ${e.data}`);});
