new Greet(p_document, p_init)
Parameters:
| Name | Type | Description |
|---|---|---|
p_document |
Object | A reference to window.document. |
p_init |
JSONinit | The initialization info for the form and the welcome section. |
- Source:
Methods
-
sayHello()
-
Welcomes the user of the web app by displaying a welcome message that includes his name. The name is fetched from a text input field.
- Source:
-
sayHelloOnEnter(p_event)
-
A keyboard event observer. It tests whether the enter key has been pressed. If so, the greet method is activated. Default reactions of the browser are disabled.
Parameters:
Name Type Description p_eventKeyboardEvent A standard JavaScript keyboard event object (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent) - Source: