Firefox Web Extensions APIS for Multiple Monitor and Full Screen

Firefox Quantum finally released on November 14, 2017. Thanks to developer that had been contribute and make this awesome things. Quoting from this link

In the past, you could develop Firefox extensions using one of three different systems: XUL/XPCOM overlays, bootstrapped extensions, or the Add-on SDK. By the end of November 2017, WebExtensions APIs will be the only way to develop Firefox extensions, and the other systems will be deprecated.

Using Firefox 57 Quantum and use Web Extensions API, I want to make extension that capable to running on multiple screen. This extension used for show dashboard that running on multiple screen.

The idea it was so simple. If two or more screen detected, every Firefox starting up then open new window for every monitor on full screen mode. I have do full screen, but facing issue to open on another monitor and detect how many monitor attached.

Using browser.windows API to create another new tab, here are some snippet code :

getCurrentWindow().then((currentWindow) => {  
  let mirror1 = browser.windows.create({
    url: "http://172.20.12.211:8080/ivi",    
    state: "fullscreen"
  });

  mirror1.then(() => {
    browser.windows.remove(currentWindow.id);
    
    var updateInfo = {
      state: "fullscreen"
    };

    let mirror2 = browser.windows.create({
      url: "http://172.20.12.211:8080/ivi",    
      state: "fullscreen"
    }); 
   
    mirror2.then((nextWindow) => { 
      var updateInfo = {
        left: 1366
      };
  
      browser.windows.update(nextWindow.id, updateInfo);
    });

  });
});

Obviously, My solution above only hard coded for two monitor and set left parameter to 1366 px, hence this solution will generating other issue if screen resolution not equal with 1366 PX * 768 PX or there are more than two monitor attached.

Thus, Is there any API or better approach to detect how many monitor that attached and also check the resolution? Is it Web Extension APIS has a feature for detected multiple monitor and get the resolution values?

Any solution? Thanks