MCPcopy Create free account
hub / github.com/GoogleChrome/samples / createPopup

Function createPopup

window-management/script.js:23–39  ·  view source on GitHub ↗
(screenX, screenY, width, height)

Source from the content-addressed store, hash-verified

21});
22
23const 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
41const getScreensInfo = async () => {
42 if ("getScreenDetails" in window) {

Callers 1

elmerifyFunction · 0.85

Calls 2

toStringMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected