Don't Build Blobs, Construct Them - HTML5Rocks Updates
Don't Build Blobs, Construct Them - HTML5Rocks Updates
window.URL = window.URL || window.webkitURL;
var blob = new Blob(['body { color: red; }'], {type: 'text/css'});
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = window.URL.createObjectURL(blob);
document.body.appendChild(link);
沒有留言:
張貼留言