This library determines if a browser supports Mapbox GL JS.
You may test your browser here.
<script src='mapbox-gl-supported.js'></script>
<script>
if (mapboxgl.supported()) {
...
} else {
...
}
</script>
Using Mapbox GL JS Supported with Browserify
npm install --save @mapbox/mapbox-gl-supported
var isSupported = require('@mapbox/mapbox-gl-supported')();