Window Management Demo

APIs: github.com/w3c/window-management

Abstract: As multi-display computing becomes a more common and critical part of user experiences, it becomes more important to give web developers information and tools to leverage that expanded visual environment.

Demo: github.com/michaelwasserman/window-placement-demo

  document.getElementById('show-slides').onclick = async function() {
    const screenDetails = await self.getScreenDetails();
    let fullscreenOptions = { navigationUI: "auto" };
    console.log("screen.length: " + screenDetails.screens.length);
    for (s of screenDetails.screens) {
      console.log(`[${s.id}] ${s.left},${s.top} ${s.width}x${s.height} ` +
                  `isPrimary:${s.isPrimary}, isInternal:${s.isInternal}`);
      if (!s.isInternal)
        fullscreenOptions.screen = s;
    }
    document.getElementById('slides').requestFullscreen(fullscreenOptions);
  }