Fine0830 commented on pull request #52:
URL: 
https://github.com/apache/skywalking-client-js/pull/52#issuecomment-828453868


   > @Fine0830 OK, I got it.
   > 
   > But there may still have a problem to solve if we send XHR request on 
`window.onbeforeunload` event. And that is, we should send XHR **Synchronous** 
instead of **asynchronous** on unload event, to ensure we report successfully.
   > 
   > So, the `function sendByXhr` @ `src/services/report.ts` may extend a param 
to control async action.
   > 
   > And here is some linked article
   > 
   > * 
https://stackoverflow.com/questions/4945932/window-onbeforeunload-ajax-request-in-chrome
   > * 
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests
   
   So this async action make serve side doesn't received data? What is your 
problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to