I’m trying to create a webworker and I’m getting a DOM Exception when trying to construct the worker in Safari 5.1.7. This happens on some domains and only in Safari. For example, if you go to CNN.com and type var test = new Worker("foo.js") , you will get a DOM exception 18. Does anyone has any ideas of why this might be happening? Thanks
Just adding some more details.. I have tested this on the new version of Safari and it does not have the same issue. Another example of a domain that seems to be having a similar issue is nordstrom.com
This is a bug in old versions of WebKit: https://bugs.webkit.org/show_bug.cgi?id=67978
It happens when you set ‘document.domain’ and then try to create a worker after the domain is set. The only workaround is to create the worker prior to setting ‘document.domain’.