function DeviceMotionSender() {
  // This is an iOS-specific workaround.
  if (!this.isIOS_()) {
    return;
  }

  window.addEventListener('devicemotion', this.onDeviceMotion_.bind(this), false);

  // Find the right iFrame to send data to.
  this.iframes = document.querySelectorAll('iframe.vrview');
}
Sends DeviceMotion events to all embedded VR views via postMessage. Note:
each iframe must have a class 'vrview'.

This is a workaround for https://bugs.webkit.org/show_bug.cgi?id=150072.