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

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -