docs: function getDelegateFunction_(listener) {
    if (!delegateFunctionMap.has(listener)) {
      var delegateFunction =
        function(e) {
          e = e || window.event;
          var target = e.target || e.srcElement;
          target = target.nodeType === 3 ? target.parentNode : target;
          do {
            listener(target, e);
            if (target.parentNode) {
              target = target.parentNode;
            }
          } while (target.parentNode);
        };
      delegateFunctionMap.set(listener, delegateFunction);
    }
    return delegateFunctionMap.get(listener);
  }