PJAX listen to pjax:end event with standard js
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So github uses "defunkt's" PJAX module ( https://github.com/defunkt/jquery-pjax#events ), and I'm making a firefox addon that needs to listen to the event pjax:end So far I can do it with jquery like this: $(document).on('pjax:end', function (t) { console.log('pjax:end'); }) however how do I do this with standard javascript functions? document.addEventListener('pjax:end',function(){ console.log('ya'); }, true); does not work. for those who know firefox-addons this code code does not work: gBrowser.contentWindow.wrappedJSObject['$'](gBrowser