Created
February 2, 2013 17:13
-
-
Save klipstein/4698354 to your computer and use it in GitHub Desktop.
Webworker Bug in Opera with importScripts (2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Using importScripts in a file which was imported via importScripts prevents loading following scripts.</title> | |
<script> | |
var worker = new Worker('worker_bug2.js'); | |
var callCount = 0; | |
worker.addEventListener('message', function() { | |
callCount++; | |
}, false); | |
setTimeout(function() { | |
console.assert(callCount == 2, 'Does not prevent executing following scripts in "importScripts", if a previously loaded js-file used "importScripts".'); | |
}, 1000); | |
</script> | |
</head> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importScripts( | |
'worker_bug2_1.js', | |
'worker_bug2_2.js', | |
// the following script is not executed, because worker_bug2_2.js used "importScripts" | |
'worker_bug2_1.js' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.postMessage(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importScripts('worker_bug2_3.js'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var foo = 'bar'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment