$ cnpm install @mapbox/mapbox-gl-supported
This library determines if a browser supports Mapbox GL JS.
You may test your browser here.
<script>
tag<script src='mapbox-gl-supported.js'></script>
<script>
if (mapboxgl.supported()) {
...
} else {
...
}
</script>
npm install --save @mapbox/mapbox-gl-supported
var isSupported = require('@mapbox/mapbox-gl-supported')();
Copyright 2013 - present © cnpmjs.org