Class sWindow
Defined in: <./sWindow.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
sWindow()
Front-end to window object properties such as height.
|
| Method Attributes | Method Name and Description |
|---|---|
|
addEvent(type, func, useCapture)
Alias to addEventListener for window.
|
|
|
addEventListener(type, func, useCapture)
Add an event listener to the window object.
|
|
|
bind(type, func, useCapture)
Alias to addEventListener for window.
|
|
|
Gets the height of the window.
|
|
|
getWidth()
Gets the width of the window.
|
Method Detail
{sWindow}
addEvent(type, func, useCapture)
Alias to addEventListener for window.
- Parameters:
- {string} type
- Type of event.
- {(EventListener|function((sEvent|Event|null)):(boolean|undefined)|null)} func
- Callback.
- {boolean} useCapture Optional
- Not used.
- Returns:
- {sWindow} The object to allow method chaining.
{sWindow}
addEventListener(type, func, useCapture)
Add an event listener to the window object.
- Parameters:
- {string} type
- Type of event.
- {(EventListener|function((sEvent|Event|null)):(boolean|undefined)|null)} func
- Callback.
- {boolean} useCapture Optional, Default: false
- If the user is to initiate the event.
- Returns:
- {sWindow} The object to allow method chaining.
{sWindow}
bind(type, func, useCapture)
Alias to addEventListener for window.
- Parameters:
- {string} type
- Type of event.
- {(EventListener|function((sEvent|Event|null)):(boolean|undefined)|null)} func
- Callback.
- {boolean} useCapture Optional
- Not used.
- Returns:
- {sWindow} The object to allow method chaining.
{number}
getHeight()
Gets the height of the window.
- Returns:
- {number} Height of the window.
{number}
getWidth()
Gets the width of the window.
- Returns:
- {number} Width of the window.