DESIGN.md §4 — native Fullscreen API toggle, .shoji-outer (ctx.ui.outer(),
the whole lightbox — backdrop, dialog, controls) is what goes fullscreen,
not just the slide media. No toolbar button at all — not a disabled one —
on a browser with no Fullscreen API support (checked once at init();
historically Safari on iOS), rather than shipping a dead control.
fullscreenchange (plus the webkitfullscreenchange vendor variant) is
the single source of truth for button state, not the click handler
directly — a real Fullscreen API request/exit call can be rejected
(permission, another element already fullscreen, etc.), and the browser's
own Escape-key fullscreen exit doesn't go through this plugin's click
handler at all. Reacting to the event instead of the request keeps the
button correct regardless of why fullscreen state changed.
DESIGN.md §4 — native Fullscreen API toggle,
.shoji-outer(ctx.ui.outer(), the whole lightbox — backdrop, dialog, controls) is what goes fullscreen, not just the slide media. No toolbar button at all — not a disabled one — on a browser with no Fullscreen API support (checked once atinit(); historically Safari on iOS), rather than shipping a dead control.fullscreenchange(plus thewebkitfullscreenchangevendor variant) is the single source of truth for button state, not the click handler directly — a real Fullscreen APIrequest/exitcall can be rejected (permission, another element already fullscreen, etc.), and the browser's own Escape-key fullscreen exit doesn't go through this plugin's click handler at all. Reacting to the event instead of the request keeps the button correct regardless of why fullscreen state changed.