Created
July 17, 2012 02:47
-
-
Save snowmantw/3126682 to your computer and use it in GitHub Desktop.
Local async javascript use Web Worker in Chrome.
This file contains 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 t = ["3+3;console.log('abc');"] | |
var tb = new Blob(t, {"type": "text\/javascript"}); | |
w = new Worker(window.webkitURL.createObjectURL(tb)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
要繞一下路:如果只是為了讓圖片可以被快取到,因為 window 沒辦法使用,必須使用 Ajax 轉 Blob ,post 出給 parent thread 再轉之