src/components/scene/vr-mode-ui.js
function createOrientationModal (onClick) {
  var modal = document.createElement('div');
  modal.className = ORIENTATION_MODAL_CLASS;
  modal.classList.add(HIDDEN_CLASS);
  modal.setAttribute(constants.AFRAME_INJECTED, '');

  var exit = document.createElement('button');
  exit.setAttribute(constants.AFRAME_INJECTED, '');
  exit.innerHTML = 'Exit VR';

  // Exit VR on close.
  exit.addEventListener('click', onClick);

  modal.appendChild(exit);

  return modal;
}
function createOrientationModal (onClick) {
  var modal = document.createElement('div');
  modal.className = ORIENTATION_MODAL_CLASS;
  modal.classList.add(HIDDEN_CLASS);
  modal.setAttribute(constants.AFRAME_INJECTED, '');

  var exit = document.createElement('button');
  exit.setAttribute(constants.AFRAME_INJECTED, '');
  exit.innerHTML = 'Exit VR';

  // Exit VR on close.
  exit.addEventListener('click', onClick);

  modal.appendChild(exit);

  return modal;
}
function createOrientationModal ( onClick ) { var modal = document . createElement ( 'div' ) ; modal . className = ORIENTATION_MODAL_CLASS ; modal . classList . add ( HIDDEN_CLASS ) ; modal . setAttribute ( constants . AFRAME_INJECTED , '' ) ; var exit = document . createElement ( 'button' ) ; exit . setAttribute ( constants . AFRAME_INJECTED , '' ) ; exit . innerHTML = 'Exit VR' ; // Exit VR on close. exit . addEventListener ( 'click' , onClick ) ; modal . appendChild ( exit ) ; return modal ; }
Creates a modal dialog to request the user to switch to landscape orientation.

@param {function} onClick - click event handler
@returns {Element} Wrapper <div>.
Creates a modal dialog to request the user to switch to landscape orientation .