web worker - XMLHttpRequest.send crashes browser -


Crash this code () - only when the caller is called in the web worker. Runs fine in the main thread.

  var xhr = new XMLHttpRequest (); Xhr.open ('GET', "http: // localhost: 62178 / document?" + Msg.url, incorrect); Xhr.setRequestHeader ('content-type', 'app / jason'); Var worker = this; Xhr.onreadystatechange = function () {// ...}; Xhr.send ();  

Any console output, only one browser crash

open Required:

  xhr.open ('GET', "http: // localhost: 62178 / document?" + Msg.url, true);  

Async should be set to true in a web worker.


Comments

Popular posts from this blog

c# - Highlight all words containing a letter in a richtextbox -

Admob interstitials not clickable on Nexus 5 (Android 4.4.2) -

java - MigLayout - selective component fill -