diff --git a/src/ui/control/fullscreen_control.js b/src/ui/control/fullscreen_control.js index 1087fa8369f..79af6736fa3 100644 --- a/src/ui/control/fullscreen_control.js +++ b/src/ui/control/fullscreen_control.js @@ -19,7 +19,7 @@ type Options = { * @param {HTMLElement} [options.source] `source` is the [compatible DOM element](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen#Compatible_elements) which should be made full screen. By default, the map container element will be made full screen. * * @example - * map.addControl(new mapboxgl.FullscreenControl({source: 'body'})); + * map.addControl(new mapboxgl.FullscreenControl({source: document.querySelector('body')})); * @see [View a fullscreen map](https://www.mapbox.com/mapbox-gl-js/example/fullscreen/) */