Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

WebExtensions multiple monitor support

  • 2 antwoorden
  • 1 heeft dit probleem
  • 1 weergave
  • Laatste antwoord van NPEFOX

more options

Using Firefox 57 Quantum I want to make extension that capable to running on multiple monitor. The idea it was so simple, if dual monitor detected, open Firefox for every monitor on full screen mode. I have do to full screen, but facing issue to open on another monitor and if possible, detect how many monitor attached.

Using browser.windows API to create another new tab, here are some snippet code : function getCurrentWindow() {

 return browser.windows.getCurrent();

}

getCurrentWindow().then((currentWindow) => {

 var updateInfo = {
   state: "fullscreen"
 };
 browser.windows.update(currentWindow.id, updateInfo);
 
 var newWindow = browser.windows.create({
   url: "http://172.20.12.211:8080/ivi",
   state: "fullscreen", 
   left: 1366
 });

});

This code above able to create a secondary tab, but quoting from this link https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create tells about :

stateOptional A windows.WindowState value. The initial state of the window. The minimized, maximized and, fullscreen states cannot be combined with left, top, width, or height.

So how I can create new window on secondary monitor on full screen mode? Is there any better approach way? Thanks

Using Firefox 57 Quantum I want to make extension that capable to running on multiple monitor. The idea it was so simple, if dual monitor detected, open Firefox for every monitor on full screen mode. I have do to full screen, but facing issue to open on another monitor and if possible, detect how many monitor attached. Using browser.windows API to create another new tab, here are some snippet code : function getCurrentWindow() { return browser.windows.getCurrent(); } getCurrentWindow().then((currentWindow) => { var updateInfo = { state: "fullscreen" }; browser.windows.update(currentWindow.id, updateInfo); var newWindow = browser.windows.create({ url: "http://172.20.12.211:8080/ivi", state: "fullscreen", left: 1366 }); }); This code above able to create a secondary tab, but quoting from this link https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create tells about : stateOptional A windows.WindowState value. The initial state of the window. The minimized, maximized and, fullscreen states cannot be combined with left, top, width, or height. So how I can create new window on secondary monitor on full screen mode? Is there any better approach way? Thanks

Alle antwoorden (2)

more options

hi NPEFOX, as this place is primarily intended for end user support, you'd get better help about developing an extension at the dedicated addons forum at https://discourse.mozilla.org/c/add-ons/development thank you for your understanding!

more options

hi Philipp, thanks for your suggestion. I've already post it on this link