Avatar for Username

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

WebExtensions multiple monitor support

  • 2 ответа
  • 1 имеет эту проблему
  • 1 просмотр
  • Последний ответ от 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

Все ответы (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