Starting from version 1078, the API prefix has been changed from hbs to qg. The original prefix hbs is still supported.
API | Description |
|---|---|
Listens for the window resize event. For example, it is triggered when a user expands, folds, or rotates the device. | |
Removes the listener function for the window resize event. |
Listens for the window resize event. For example, it is triggered when a user expands, folds, or rotates the device.
Parameter | Type | Mandatory | Description |
|---|---|---|---|
callback | function | Yes | Listener function for the window resize event. This function is triggered when the window is resized (for example, when a user expands, folds, or rotates the device). For details, please refer to Parameters in callback. |
Parameter | Type | Description |
|---|---|---|
rect | object | Dimensions of the widget. For details, refer to Parameters in rect. |
qg.onWindowResize(async (rect) => {
console.info(rect.windowWidth, rect.windowHeight);
}); Parameter | Type | Mandatory | Description |
|---|---|---|---|
callback | function | Yes | Listener function for the window resize event passed to onWindowResize. |
qg.offWindowResize(callback);