Answers for "chrome extension detect second monitor"

0

chrome extension detect second monitor

chrome.system.display.getInfo((screens) => {
  screens.forEach((screen) => {
    chrome.app.window.create("app.html", {
      outerBounds: screen.workArea // It so happens it's formatted as expected
    });
  });
});

"system.display" permission required

If you pass outerBounds.top/outerBounds.left properties to chrome.app.window.create, those actually refer to the combined coordinate space, not the current monitor. Chrome will likely clamp/shift what you pass to it to fit in the screen.
Posted by: Guest on August-13-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language