We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在第4小节"处理 Ajax 事件" 中 "ajax:success"事件的参数是[ xhr, status, err ],而在jquery-ujs的wiki中的参数是[ data, status, xhr ]。谢谢查看! Custom events fired during "data-remote" requests
The text was updated successfully, but these errors were encountered:
看了新旧两班 rails.js 源码之后,我觉得 jquery-ujs wiki 的是对的
https://github.com/rails/jquery-ujs/blob/4849eca8ff76a0a2a83a8ff4d5cefef2c2fa3cb4/src/rails.js#L156-L158 https://github.com/rails/rails/blob/4b29d9f1db0dd8fc95829cfefed0687242cfc12b/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee#L19
rails guides 里面错了,不过英文原文就错了。
晚点再处理。
Sorry, something went wrong.
发现官方多了一段 Rails 5.1 的 event 描述还没发布 https://github.com/rails/rails/blob/98f8f81879825a009b0c751b3178fcb687e3033a/guides/source/working_with_javascript_in_rails.md#rails-ujs-event-handlers
我也晕了,应该以实测为准。
对,我本以为是jquery版本造成的(我用的是 v1.12.4,本想下载个1.8.x来测试一下再给你反馈,不过一直没时间)。data, status, xhr的是获取不了参数,而如你所发链接里的event.detail来获取[data, status, xhr];
No branches or pull requests
在第4小节"处理 Ajax 事件" 中 "ajax:success"事件的参数是[ xhr, status, err ],而在jquery-ujs的wiki中的参数是[ data, status, xhr ]。谢谢查看!
Custom events fired during "data-remote" requests
The text was updated successfully, but these errors were encountered: