function FullscreenButton(container, fullscreenElement) {
  //>>includeStart('debug', pragmas.debug);
  if (!defined(container)) {
    throw new DeveloperError("container is required.");
  }
  //>>includeEnd('debug');

  container = getElement(container);

  const viewModel = new FullscreenButtonViewModel(fullscreenElement, container);

  viewModel._exitFullScreenPath = exitFullScreenPath;
  viewModel._enterFullScreenPath = enterFullScreenPath;

  const element = document.createElement("button");
  element.type = "button";
  element.className = "cesium-button cesium-fullscreenButton";
  element.setAttribute(
    "data-bind",
    "\
attr: { title: tooltip },\
click: command,\
enable: isFullscreenEnabled,\
cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }",
  );

  container.appendChild(element);

  knockout.applyBindings(viewModel, element);

  this._container = container;
  this._viewModel = viewModel;
  this._element = element;
}
A single button widget for toggling fullscreen mode.

@alias FullscreenButton
@constructor

@param {Element|string} container The DOM element or ID that will contain the widget.
@param {Element|string} [fullscreenElement=document.body] The element or id to be placed into fullscreen mode.

@exception {DeveloperError} Element with id "container" does not exist in the document.

@see Fullscreen