PDFPageElement: fullscreen property

Works in all major browsers
Since July 2026

WebPDF works in Chrome and Edge 125, Firefox 153 and Safari 18, on desktop and mobile, and in every later version: the oldest versions its PDF.js build supports, which already have every platform feature WebPDF needs. Since July 2026, that is every major browser.

The fullscreen read-only property of the PDFPageElement interface returns true while a <pdf-page> is shown fullscreen.

Value

A boolean value. It is true when the page matches :fullscreen, which also works for a page inside a shadow root, where document.fullscreenElement would point at the shadow host instead.

Examples

Reacting to fullscreen

js
const page = document.querySelector("pdf-page");
page.addEventListener("fullscreenchange", () => {
  console.log(page.fullscreen ? "fullscreen" : "back in the page");
});

Specifications

Not part of any specification. <pdf-file> and <pdf-page> are autonomous custom elements defined by WebPDF.pro.

Browser compatibility

desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
fullscreen
12512515311118125153831827125No
  • fullscreen · Safari on iOS: Only available on iPad, not on iPhone: there, toggleFullscreen() resolves to false.
  • fullscreen · WebView on iOS: Not available: toggleFullscreen() resolves to false.

Legend

Full support
Partial support
No support
See implementation notes.

See also