| // Copyright 2021 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Interface exposing multi-screen information. |
| // https://github.com/webscreens/window-placement |
| [ |
| Exposed=Window, |
| SecureContext, |
| RuntimeEnabled=WindowPlacement |
| ] interface Screens { |
| // The set of available screens with additional per-screen info. |
| readonly attribute FrozenArray<ScreenAdvanced> screens; |
| |
| // Current screen reference; corresponds with window.screen. |
| readonly attribute ScreenAdvanced currentScreen; |
| |
| // Change event fired when `screens` or `currentScreen` changes. |
| // NOTE: Does not fire on changes to attributes of individual Screens. |
| [HighEntropy, Measure] attribute EventHandler onchange; |
| }; |