Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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