The exit button is host-intercepted (onFullscreenExitRequest): instead of just leaving fullscreen, this page logs the request, exits and returns to the demo list — so your app decides what leaving fullscreen means (close the page, go back…). Esc exits directly (browser behavior that cannot be intercepted).