I have a project that loads an external SVG file with: Snap.load("assets/svg/drawing.svg", function(f) { . . .
or at least it should. It works fine in Safari (on OS X), but my preferred browser for SVG is Google Chrome. Chrome fails to load the SVG file and throws the following
Console errors:
XMLHttpRequest cannot load file:///Users/. . . /assets/svg/drawing.svg.
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource
.
Uncaught TypeError: Cannot read property 'hover' of null
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///Users/apple_2/Desktop/html/snap/i-programmer/assets/svg/drawing.svg'.