You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/04/28 08:18:33 UTC

[GitHub] [skywalking-client-js] rovast commented on pull request #52: feat: add report interval params to register method

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


   @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


-- 
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:
users@infra.apache.org