docs: function observeGlobalEvents(event){
      var handlers = arrayFrom(globalHandlers[event.type]);
      var captureHandler = captureHandlers[event.type];
      var wrappedEvent = new Event(event);
  
      startFrame(event);
  
      if (captureHandler)
      {
        captureHandler.handler.call(captureHandler.thisObject, wrappedEvent);
      }
      else
      {
        if (handlers)
        {
          for (var i = handlers.length; i-- > 0;)
          {
            var handlerObject = handlers[i];
            handlerObject.handler.call(handlerObject.thisObject, wrappedEvent);
          }
        }
      }
  
      finishFrame(event);
    }