Skip to content
New issue

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

ajax同步请求拦截 #23

Open
throwAndCatch opened this issue Jan 8, 2019 · 2 comments
Open

ajax同步请求拦截 #23

throwAndCatch opened this issue Jan 8, 2019 · 2 comments

Comments

@throwAndCatch
Copy link

请问怎么拦截同步的请求呢,因为同步请求不会触发onreadystatechange。

@guotao
Copy link

guotao commented Nov 21, 2022

+1

@faf-xff
Copy link

faf-xff commented May 16, 2024

我这样写的:

send: function (arg, xhr) {
console.log("send called: %O", xhr)
xhr.addEventListener('readystatechange', function () {
console.log("请求的readyState:" +this.readyState);
}, false);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants