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

  container = getElement(container);

  const viewModel = new VRButtonViewModel(scene, vrElement);

  viewModel._exitVRPath = exitVRPath;
  viewModel._enterVRPath = enterVRPath;

  const element = document.createElement("button");
  element.type = "button";
  element.className = "cesium-button cesium-vrButton";
  element.setAttribute(
    "data-bind",
    '\
css: { "cesium-button-disabled" : _isOrthographic }, \
attr: { title: tooltip },\
click: command,\
enable: isVREnabled,\
cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }',
  );

  container.appendChild(element);

  knockout.applyBindings(viewModel, element);

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

@alias VRButton
@constructor

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

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