🖥️ Chapter 54: The Fullscreen API

Fullscreen Security, Phishing Risks & User Ergonomics

**Part 11: HTML5 APIs Part 2** — Chapter 54: Fullscreen API

LEARNING OBJECTIVES
  • Understand how malicious actors exploit Fullscreen API for browser UI spoofing (Fake URL bar phishing).
  • Learn how modern browsers defend users via mandatory Fullscreen Toast Overlays ("Press Esc to exit").
  • Master transient user activation requirements (User Gesture requirement).
  • Enforce accessible keyboard exits and visual feedback.
🎬 INTERACTIVE VISUAL PIPELINE Core Architecture Simulation
🌐
1. Input
Directives & Tags
⚙️
2. Parse
Tokenizer & AST
🌳
3. Layout
Box Model & Flow
🎨
4. Render
GPU Paint & Composite
PHASE 1: INPUT & DIRECTIVES
Browser receives declarative markup stream, parsing tag tokens and initializing component state.

📖 The Security Threat Model: Fake Browser UI Spoofing

In a fullscreen phishing attack, a malicious website requests full screen, paints a fake operating system taskbar, and renders a spoofed Chrome/Safari address bar showing https://accounts.google.com or https://chase.com.

To prevent this exploit:

  1. Mandatory User Gesture: requestFullscreen() can only be called inside transient user action handlers (click, keydown). Script-initiated calls are blocked.
  2. OS/Browser Warning Toast: Browsers inject an un-spoofable overlay informing the user that the site has entered fullscreen.
  3. Immutable Escape Key: The browser hardware interceptor guarantees that pressing Esc exits fullscreen immediately, preventing JavaScript interception.
+-------------------------------------------------------------+
| BROWSER TOAST (Cannot be overridden by CSS/JS):             |
| [ site.com has gone fullscreen. Press Esc to exit. ]       |
+-------------------------------------------------------------+

📌 Key Takeaways

  • The Fullscreen API is strictly governed by the User Activation gating model.
  • Pressing Esc will always exit fullscreen at the browser engine level.
  • Never attempt to suppress or mimic native browser UI in fullscreen applications.
  • --

❓ Knowledge Check

1. Which of the following is correct?

2. Which of the following is correct?