When I write an onmessage callback for a web worker, I get the message "Uncaught Error: SYNTAX_ERR: DOM Exception 12" in my console when I try to send another postMessage () message.
var w = new Worker(url); w.onmessage = function(e) { if(e.data.msg=='validate'){ if(validateWork(e.data.wrk)){ postMessage('proceed'); } } }
You must call postMessage () using this when in a callback.
this.postMessage('proceed');
I think this will work too:
w.postMessage ('go over');
Source: https://habr.com/ru/post/1391592/More articles:ROWLOCK on sql server - sql-server-2008Android pinch zoom on Google Maps - androidTomcat not working on Amazon EC2, Redhat Instance - javaWhy does cudaMalloc give me an error when I know that there is enough memory space? - memoryAmazon S3 when creating an object, it throws a cURL error - javascriptJMS ConnectionFactory NullPointerException - javaHow to list all users in Active Directory in DropDownList Control - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1391595/how-do-i-do-delete-any-references-to-an-object-when-that-object-is-deleted-in-doctrine-mongodb&usg=ALkJrhgk2iEfN_aPPEUryJvk-RK8YcmeFQHow to work elementally on a matrix like scipy.sparse.csr_matrix? - pythonElemental matrix power scipy.sparse - pythonAll Articles