| <!DOCTYPE html> |
| <!-- |
| Copyright 2022 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. |
| --> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <title>Fullscreen request delegation receiver</title> |
| </head> |
| <script> |
| // https://wicg.github.io/capability-delegation/spec.html |
| async function requestFullscreenAndReport(event) { |
| document.documentElement.requestFullscreen().finally(() => { |
| event.source.postMessage(!!document.fullscreenElement, "*"); |
| }); |
| } |
| |
| window.addEventListener("message", requestFullscreenAndReport); |
| </script> |
| </html> |