Last active
August 29, 2015 14:08
-
-
Save 3rd-Eden/27a04a80dcf77ca180cd to your computer and use it in GitHub Desktop.
URL generation inside WebWorker which is generated through a blob.
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 x = new Blob(['var loc = location; if (location.protocol === "blob:") loc = new URL(unescape(loc.pathname)); console.log(new URL("/foo", loc)); '], { type: 'text/javascript' }) | |
, y = URL.createObjectURL(x) | |
, w = new Worker(y); |
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 x = new Blob(['console.log(location);console.log(new URL("/foo", location))'], { type: 'text/javascript' }) | |
, y = URL.createObjectURL(x) | |
, w = new Worker(y); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment