Fyrd / caniuse

Raw browser/feature support data from caniuse.com
https://caniuse.com
Creative Commons Attribution 4.0 International
5.61k stars 1.38k forks source link

Safari can't use FileReader in sandboxed iframe #3266

Open jimmywarting opened 7 years ago

jimmywarting commented 7 years ago

Think it would be useful to flag this. In fact safari has several issues with blob in sandboxed iframe (<iframe sandbox="allow-scritps">) You can't create a ObjectURL and use it on a element. eg:

script = document.createElement('script')
script.src = URL.createObjectURL( new Blob(["alert('Wello world')"]) )
document.body.appendChild(script)

(same goes for making image, iframes, css links element and everything else)

Reading something you have created yourself won't work

blob = new Blob(["abc"])
fr = new FileReader()
fr.readAsText(blob)

stuff you are fetching with fetch res.blob() and xhr's responseType = blob can't be read


BTW, this only applies to secure (https) pages

jimmywarting commented 7 years ago

I created a fiddle to demonstrate it: https://jsfiddle.net/bgh27rre/1/