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

Function toggleResizable

seamless-titlebar/script.js:52–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50/* Toggle window resizable. */
51
52async function toggleResizable() {
53 const isResizable = window.matchMedia(`(resizable: true)`).matches;
54
55 try {
56 await window.setResizable(!isResizable);
57 } catch (error) {
58 console.log("Setting a fixed size window failed: ", error);
59 }
60}
61
62document
63 .getElementById("toggle-resizable-btn")

Callers 1

script.jsFile · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected