MCPcopy
hub / github.com/eligrey/FileSaver.js / corsEnabled

Function corsEnabled

src/FileSaver.js:47–55  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

45}
46
47function corsEnabled (url) {
48 var xhr = new XMLHttpRequest()
49 // use sync to avoid popup blocker
50 xhr.open('HEAD', url, false)
51 try {
52 xhr.send()
53 } catch (e) {}
54 return xhr.status >= 200 && xhr.status <= 299
55}
56
57// `a.click()` doesn't work for all browsers (#465)
58function click (node) {

Callers 1

FileSaver.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected