Skip to content

Conversation

cyfung1031
Copy link
Contributor

@cyfung1031 cyfung1031 commented Aug 16, 2023

Note: since xhr is set to null in config after xhr.readyState becomes 4, config.xhr will be null in async function inside onResponse.

onResponse: function(response, handler){
     ...
      const config = response.config;
      if(config.xhr.readyState  === XMLHttpRequest.DONE){
           setTimeout(()=>{
               console.log('config.xhr === null', config.xhr===null);
          }, 100)
      }
     ...
     handler.resolve(response);
}

cyfung1031 added a commit to cyfung1031/ajax-hook that referenced this pull request Aug 16, 2023
cyfung1031 added a commit to cyfung1031/ajax-hook that referenced this pull request Aug 16, 2023
cyfung1031 added a commit to cyfung1031/ajax-hook that referenced this pull request Aug 16, 2023
cyfung1031 added a commit to cyfung1031/ajax-hook that referenced this pull request Aug 16, 2023
cyfung1031 added a commit to cyfung1031/ajax-hook that referenced this pull request Aug 16, 2023
@cyfung1031
Copy link
Contributor Author

Combined Distribution Script ajaxhook.js for Testing (PR 119, 120, 121, 122)
https://cdn.jsdelivr.net/gh/cyfung1031/ajax-hook@1ebe48e08108449669290a226e52fc6fbf7ec9ef/dist/ajaxhook.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant