Summary
In this chapter, you learned how to solve the most common cross-browser issues with the best tools. With Modernizr, we can build a lightweight script that detects supported browser features in CSS and JavaScript. We can provide polyfills or use a wrapper whenever it is necessary.
For creating an SVG visualization using D3, we need to be aware of the restrictions from the supported SVG specification. Hence, we need to take special care when dealing with filters, animations, and clipping paths.
You learned how to create responsive visualizations that work across all browsers. One key thing to remember when using Media Queries is the matchMedia
polyfill, which is commonly used by other tools to polyfill the native JavaScript function. Respond.js
is a great polyfill for simple CSS Media Queries, and Enquire.JS
motivates you to move your Media Queries to JavaScript.
Finally, we discussed different mouse- and touch-related problems and a solution for building cross-browser compatible applications...