| 21 | }); |
| 22 | |
| 23 | const createPopup = (screenX, screenY, width, height) => { |
| 24 | const features = [ |
| 25 | `left=${screenX}`, |
| 26 | `top=${screenY}`, |
| 27 | `width=${width}`, |
| 28 | `height=${height}`, |
| 29 | `menubar=no`, |
| 30 | `toolbar=no`, |
| 31 | `location=no`, |
| 32 | `status=no`, |
| 33 | `resizable=yes`, |
| 34 | `scrollbars=no` |
| 35 | ].join(","); |
| 36 | // TODO(crbug.com/1153004): The onPopupClose beforeunload works with about:blank popups... |
| 37 | // return window.open("about:blank", Math.random().toString(), features); |
| 38 | return window.open("iframe.html", Math.random().toString(), features); |
| 39 | }; |
| 40 | |
| 41 | const getScreensInfo = async () => { |
| 42 | if ("getScreenDetails" in window) { |