給js注入debugger

轉載http://www.aaron-powell.com/posts/2014-03-06-debugging-jquery-events.htmlhtml

(function () { var element = $('.selector')[0] var clicks = $._data(element).events.click; clicks.forEach(function (click) { var handler = click.handler; click.handler = function () { debugger; handler.apply(this, arguments); }; }); })();jquery

相關文章
相關標籤/搜索