Page MenuHomePhabricator

Graph does not support IE8 and throws JS errors
Closed, DeclinedPublic


IE8 currently doesn't show any Graphs at all and throws a JS error.

The cause for the JS error is because the Vega library has definitions like:

vg.true = function() { return true; };

So it's using a reserved keyword as a property, which is not possible on older browsers like IE8. I guess we need to disable the scripts on IE8, because there is quite a bit of es5 being used by these libs.

IE8 also doesn't support canvas, so even if we can get it to be es3 compatible, it still won't be able to actually draw something. We probably need to check for the existence of window.CanvasRenderingContext2D

Event Timeline

TheDJ raised the priority of this task from to High.
TheDJ updated the task description. (Show Details)
TheDJ added a subscriber: TheDJ.

Merged with (this is our Vega fork). Submitted to upstream.

Change 210008 had a related patch set uploaded (by Yurik):
Bumped Vega to 1.5.3

Even though I merged the patch, I am still having doubts if we should do this if IE8 does not support canvases. Should we simply wrap around it, checking if canvases are supported, and keep the syntax cleaner (ES5)?

Upon further thinking, I think it would be a bad idea to introduce ES3-compatible code here - makes it too ugly. Instead, we should solve this with the conditional IMG fallback loading, e.g. detect canvas support and use the <img> tag if not. The fix should also prevent vega/d3 lib loading.

Change 210008 abandoned by Yurik:
Bumped Vega to 1.5.3

per - not a good approach

Well, the problem is that without the ES3 compatibility, you cannot DELIVER it to an IE8 client (it's a parsing error, not an execution error). That means that you need to do client side module loading, which MIGHT be a good idea, fore reasons stated in T98704

For execution on IE8, you would need an s5-shim and a canvas polyfill.

Since we are switching to <img> for everyone except when editing, see 209823, this issue should be solved for non-editing case.

Do we want to keep this issue, since now IE8 is no longer supported as grade A?

Yurik lowered the priority of this task from High to Low.Jan 8 2016, 7:39 AM
Ricordisamoa claimed this task.

Static PNGs are the only viable option.