zoukankan      html  css  js  c++  java
  • jquery , find the event handler,找到jquery中的event handler

    找到

    dispatch: function (e) {
                e = b.event.fix(e);
                var n, r, i, s, o, u = [],
                    a = d.call(arguments),
                    f = (b._data(this, "events") || {})[e.type] || [],
                    l = b.event.special[e.type] || {};
                a[0] = e, e.delegateTarget = this;
                if (l.preDispatch && l.preDispatch.call(this, e) === !1) return;
                u = b.event.handlers.call(this, e, f), n = 0;
                while ((s = u[n++]) && !e.isPropagationStopped()) {
                    e.currentTarget = s.elem, o = 0;
                    while ((i = s.handlers[o++]) && !e.isImmediatePropagationStopped())
                        //if (!e.namespace_re || e.namespace_re.test(i.namespace)) e.handleObj = i, e.data = i.data, r = ((b.event.special[i.origType] || {}).handle || i.handler).apply(s.elem, a), r !== t && (e.result = r) === !1 && (e.preventDefault(), e.stopPropagation());
                        if (!e.namespace_re || e.namespace_re.test(i.namespace))
                        {
                            console.log('enent.dispathc;beginning of invoking event handler');
                            e.handleObj = i;
                            e.data = i.data;
                            var _tmp=((b.event.special[i.origType] || {}).handle || i.handler);
                  //begin , add following code Fragment
    if(jQuery('strong',s.elem).text()=='dd') { console.log('event fired'); //add your breakpoint here, while the breakpoint is fired, input _temp in console and press enter, now you can see your handler function, click the link on the right bottom cornor to jump into the function }
                  //end r
    = _tmp.apply(s.elem, a); r !== t && (e.result = r) === !1 && (e.preventDefault(), e.stopPropagation()); } } return l.postDispatch && l.postDispatch.call(this, e), e.result; }
  • 相关阅读:
    Hibernate
    Mysql
    JavaWeb
    Springboot
    spring MVC
    spring
    mybatis学习
    ftp客户端封装
    win10子系统 wsl开机启动ssh服务
    eclipse 终于官方支持代码模糊提示了
  • 原文地址:https://www.cnblogs.com/zyip/p/3654088.html
Copyright © 2011-2022 走看看