Skip to content

Browsers and Compatibility

Tobias Ortmayr edited this page Feb 10, 2020 · 2 revisions

Browsers and Compatibility

This page lists all measures we have to take to maintain compatibility to a large set of browsers. It always is a good idea to update to the latest version if possible.

Chrome

Our reference browser. Used during development and therefore well tested. Pretty fast.

Safari

Works, but performance is well behind Chrome.

Firefox

Well tested, but performance is a bit behind Chrome. Workarounds in Code:

  • FocusFixDecorator in order to react to key events, the SVG element needs to have a tabindex

Microsoft Edge

Workarounds in Code

  • use Element#parentNode instead of Element#parentElement to traverse DOM (the latter returns null for SVG elements)
  • use Element#childNodes instead of Element#children to traverse DOM (the latter returns null for SVG elements)
  • doesn't support CSS property dominant-baseline on text elements (link). We therefore need to apply a layout to center text vertically, e.g. for the icon in the class diagram example.
  • 
    

Polyfills:

  • dom4 to add classList to SVGElements

Microsoft IE11

We have to support this as it is the only current browser back-end that works in SWT's browser widget on windows.

Compilation:

  • es5 target in tsconfig.json

Workarounds in Code:

  • all from MS Edge
  • use window.pageXOffset instead of window.scrollX to recieve the top-scroll x value (the latter is not supported)
  • use window.pageYOffset instead of window.scrollY to recieve the top-scroll y value (the latter is not supported)

Polyfills:

  • core-js to shim ES6 features
  • all from MS Edge

Eclipse

Windows

Eclipse's Internal Web browser uses Microsoft IE on Windows. Bug:

  • If the language in the internet options of IE is German, SVG export will produce numbers with comma as decimal delimiter instead of a dot. These SVGs are broken. See this bug.

Other platforms

No issues yet