* Gets the width and height of the current window * @param windowHandle * @returns {Promise<{width: *, height: *}>}
(windowHandle = 'current')
| 2402 | * @returns {Promise<{width: *, height: *}>} |
| 2403 | */ |
| 2404 | async getSize(windowHandle = 'current') { |
| 2405 | if (windowHandle !== 'current') { |
| 2406 | this.log_.warning(`Only 'current' window is supported for W3C compatible browsers.`) |
| 2407 | } |
| 2408 | |
| 2409 | const rect = await this.getRect() |
| 2410 | return { height: rect.height, width: rect.width } |
| 2411 | } |
| 2412 | |
| 2413 | /** |
| 2414 | * Sets the width and height of the current window. (window.resizeTo) |