Skip to content

Instantly share code, notes, and snippets.

@guybrush
Created August 7, 2014 20:31
Show Gist options
  • Save guybrush/4d1134290c2f7a66f104 to your computer and use it in GitHub Desktop.
Save guybrush/4d1134290c2f7a66f104 to your computer and use it in GitHub Desktop.
firefox 31 issue: crypto in webworker
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script>
console.log(crypto.getRandomValues(new Uint8Array(1)))
var src = 'crypto.getRandomValues(new Uint8Array(1))'
var blob = new Blob([src],{type:'text/javascript'})
new Worker(window.URL.createObjectURL(blob))
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment