Handling Fullscreen Events
index.html
style.css
script.js
When you use the Fullscreen API, you might want your page to react whenever the user enters or exits fullscreen mode. The fullscreenchange event lets you detect these changes. In the example above, the code adds event listeners for both fullscreenchange and fullscreenerror. When the fullscreenchange event fires, the button label updates to reflect the current fullscreen state, and a message displays to show whether fullscreen mode was entered or exited. This makes the user interface more responsive and clear. If something goes wrong, the fullscreenerror event displays an error message so users know what happened. By using these events, you can keep your UI in sync with the actual fullscreen state, giving users a seamless experience.
Дякуємо за ваш відгук!
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 7.14
Handling Fullscreen Events
Свайпніть щоб показати меню
index.html
style.css
script.js
When you use the Fullscreen API, you might want your page to react whenever the user enters or exits fullscreen mode. The fullscreenchange event lets you detect these changes. In the example above, the code adds event listeners for both fullscreenchange and fullscreenerror. When the fullscreenchange event fires, the button label updates to reflect the current fullscreen state, and a message displays to show whether fullscreen mode was entered or exited. This makes the user interface more responsive and clear. If something goes wrong, the fullscreenerror event displays an error message so users know what happened. By using these events, you can keep your UI in sync with the actual fullscreen state, giving users a seamless experience.
Дякуємо за ваш відгук!