code: function supportsEventPageXY() {
      if (!document.createEvent) {
        return false;
      }
      var ev = document.createEvent('MouseEvent');
      return ev != null && 'pageX' in ev;
    }
docs: Protect against document.createEvent() returning null
  Some popup blocker extensions appear to do this:
  https://github.com/facebook/react/issues/6887