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

Editing Python Class in Shell and SQLAlchemy -

import - Python ImportError: No module named wmi -

uislider - In a MATLAB GUI, how does one implement a continuously varying slider from a GUIDE created .m file? -