Created
November 26, 2014 16:25
-
-
Save doochik/575b94b20765b028dc70 to your computer and use it in GitHub Desktop.
IE10/11 can't execute blob-js with 114688 bytes size
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 text = "var a = '"; | |
for (var i = text.length; i < 114686; i++) { | |
text += '1'; | |
} | |
text += "';"; | |
console.log('text size:', text.length); | |
var blob = new Blob([text], {type: 'text/javascript'}); | |
var url = URL.createObjectURL(blob); | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'text/javascript'); | |
script.setAttribute('charset', 'utf-8'); | |
// no events for size 114688 | |
script.onload = function() { console.log('onload'); }; | |
script.onerror = function() { console.log('onerror'); }; | |
script.onreadystatechange = function() { console.log('onreadystatechange'); }; | |
script.setAttribute('src', url); | |
document.body.appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Live http://jsfiddle.net/prad0r93/