jonathantneal / svg4everybody

Use external SVG spritemaps today
https://jonneal.dev/svg4everybody/
Other
3.29k stars 353 forks source link

Running svg4everybody() in IE8 causes Unresponsive Script error #84

Closed lewishowles closed 8 years ago

lewishowles commented 9 years ago

I've been getting an unresponsive script error popping up for a new website I'm creating that requires IE8 support. Luckily I don't usually have to deal with IE8!

I've replaced by standard script with the legacy script, and I've tried both svg4everybody(); and

svg4everybody({
    nosvg: true
});

But each time it pops up with the error.

Removing the call to svg4everybody (but leaving the actual script in) doesn't cause the issues.

I've tried removing other scripts as much as possible to see if it's a conflict but it doesn't seem to be. Removing all other scripts still displays the issue.

I am using Microsoft's Modern.ie virtual machines in VirtualBox, which sometimes causes weird errors, but I can't tell if that's the case here.

danilobuerger commented 9 years ago

:+1:

stephenmcghee commented 9 years ago

I'm having similar issues with IE8 (but using the built in IE emulator).

Using only the legacy script and:

svg4everybody({
nosvg: false, // shiv  and  elements and use image fallbacks
polyfill: true // polyfill  elements for External Content
});

gives me unreponsive script errors.

and:

svg4everybody();

just shows "x" boxes where the svg's are supposed to be.

danilobuerger commented 9 years ago

@SRTM your latter issue is because IE <= 8 will fallback to using pngs, so if they don't exist at the path, IE 8 will show Xs.

stephenmcghee commented 9 years ago

Figured it was something like that. So the first option is the only way to get svg4everybody to polyfill SVG's in IE8? Or do you absolutely need png fallbacks. Will need to wait for a fix if so.

lewishowles commented 9 years ago

You need PNG for IE8.

stephenmcghee commented 9 years ago

fml. ok thanks.

jonathantneal commented 8 years ago

Yes. No one ever had time to write a working VML fallback for IE8, so PNGs are our reality. Thankfully, IE8 support is fringe for new projects these days.