# Document: fullscreenElement property



The
**`Document.fullscreenElement`** read-only
property returns the [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that is currently being presented in
fullscreen mode in this document, or `null` if fullscreen mode is not
currently in use.

Although this property is read-only, it will not throw if it is modified (even in
strict mode); the setter is a no-operation and it will be ignored.

## Value

The [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) object that's currently in fullscreen mode; if fullscreen
mode isn't currently in use by the `document`, the returned
value is `null`. If there are multiple elements in fullscreen mode, the topmost (most recently requested) element is returned.

## Examples

This example presents a function, `isVideoInFullscreen()`, which looks at
the value returned by `fullscreenElement`; if the document is in fullscreen
mode (`fullscreenElement` isn't `null`) and the fullscreen
element's [nodeName](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName) is `VIDEO`, indicating a
[video](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video) element, the function returns `true`, indicating
that the video is in fullscreen mode.

```js
function isVideoInFullscreen() {
  if (document.fullscreenElement?.nodeName === "VIDEO") {
    return true;
  }
  return false;
}
```

## Specifications

## Browser compatibility

## See also

- [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API)
- [Guide to the Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API/Guide)
- [Element.requestFullscreen()](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen)
- [Document.exitFullscreen()](https://developer.mozilla.org/en-US/docs/Web/API/Document/exitFullscreen)
- [:fullscreen](https://developer.mozilla.org/en-US/docs/Web/CSS/%3Afullscreen) and [::backdrop](https://developer.mozilla.org/en-US/docs/Web/CSS/%3A%3Abackdrop)
- The [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) [`allowfullscreen`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe#allowfullscreen)
  attribute
