* Gets the width and height of the current window * @param windowHandle * @returns {Promise<{width: *, height: *}>}
(windowHandle = 'current')
| 2276 | * @returns {Promise<{width: *, height: *}>} |
| 2277 | */ |
| 2278 | async getSize(windowHandle = 'current') { |
| 2279 | if (windowHandle !== 'current') { |
| 2280 | this.log_.warning(`Only 'current' window is supported for W3C compatible browsers.`) |
| 2281 | } |
| 2282 | |
| 2283 | const rect = await this.getRect() |
| 2284 | return { height: rect.height, width: rect.width } |
| 2285 | } |
| 2286 | |
| 2287 | /** |
| 2288 | * Sets the width and height of the current window. (window.resizeTo) |