code: function getEventTarget(editor, eventName) {
        if (eventName == 'selectionchange') {
          return editor.getDoc();
        }
  
        // Need to bind mousedown/mouseup etc to document not body in iframe mode
        // Since the user might click on the HTML element not the BODY
        if (!editor.inline && /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(eventName)) {
          return editor.getDoc().documentElement;
        }
  
        // Bind to event root instead of body if it's defined
        if (editor.settings.event_root) {
          if (!editor.eventRoot) {
            editor.eventRoot = DOM.select(editor.settings.event_root)[0];
          }
  
          return editor.eventRoot;
        }
  
        return editor.getBody();
      }
docs: Returns the event target so for the specified event. Some events fire
  only on document, some fire on documentElement etc. This also handles the
  custom event root setting where it returns that element instead of the body.
  
  @private
  @param {tinymce.Editor} editor Editor instance to get event target from.
  @param {String} eventName Name of the event for example "click".
  @return {Element/Document} HTML Element or document target to bind on.