搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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