code: function bubbleEvent(element, type, eventObject) {
          while (element) {
              var handlers = lookupListeners(element, type);
              for (var i = 0, len = handlers.length; i < len; i++) {
                  handlers[i].listener.call(element, eventObject);
              }
  
              element = element.parentNode;
          }
      }
docs: Custom focusin/focusout events Generally, use these instead of using the browser's blur/focus/focusout/focusin events directly. However, this doesn't support the window object. If you need to listen to focus events on the window, use the browser's events directly.  In order to send our custom focusin/focusout events synchronously on every browser, we feature detect for native "focusin" and "focusout" since every browser that supports them will fire them synchronously. Every browser in our support matrix, except for IE, also fires focus/blur synchronously, we fall back to those events in browsers such as Firefox that do not have native support for focusin/focusout.