سؤال

When writing the onmessage callback for a Web Worker I get an "Uncaught Error: SYNTAX_ERR: DOM Exception 12" in my console when I try to send another postMessage().

var w = new Worker(url);
w.onmessage = function(e) {
    if(e.data.msg=='validate'){
        if(validateWork(e.data.wrk)){
            postMessage('proceed');
        }
    }
}

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top