From 6b8c80d246e266cee15636b77651ba559b94b24a Mon Sep 17 00:00:00 2001 From: Dom Brassey Date: Tue, 22 Sep 2020 13:13:42 -0700 Subject: [PATCH] Add to 'supported' API example (so it does something with the result) (#9989) * add to example so it does something with the result * use multi-line code formatting * add closing } Co-authored-by: Heather Stenson --- src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index bdc8b97f348..7928a81485f 100644 --- a/src/index.js +++ b/src/index.js @@ -193,7 +193,10 @@ Debug.extend(exported, {isSafari, getPerformanceMetrics: PerformanceUtils.getPer * be dramatically worse than expected (e.g. a software WebGL renderer would be used). * @return {boolean} * @example - * mapboxgl.supported() // = true + * // Show an alert if the browser does not support Mapbox GL + * if (!mapboxgl.supported()) { + * alert('Your browser does not support Mapbox GL'); + * } * @see [Check for browser support](https://www.mapbox.com/mapbox-gl-js/example/check-for-support/) */