@@ -57,16 +57,18 @@ const exported = {
5757 * used, must be set before `prewarm()` is called to have an effect.
5858 *
5959 * By default, the lifecycle of these resources is managed automatically, and they are
60- * lazily initialized when a Map is first created. By invoking `prewarm()`, these
61- * resources will be created ahead of time, and will not be cleared when the last Map
62- * is removed from the page. This allows them to be re-used by new Map instances that
60+ * lazily initialized when a ` Map` is first created. Invoking `prewarm()` creates these
61+ * resources ahead of time and ensures they are not cleared when the last ` Map`
62+ * is removed from the page. This allows them to be re-used by new ` Map` instances that
6363 * are created later. They can be manually cleared by calling
64- * `mapboxgl.clearPrewarmedResources()`. This is only necessary if your web page remains
65- * active but stops using maps altogether.
64+ * `mapboxgl.clearPrewarmedResources()`. This is only necessary if your web page
65+ * remains active but stops using maps altogether. `prewarm()` is idempotent
66+ * and has guards against being executed multiple times, and any resources
67+ * allocated by `prewarm()` are created synchronously.
6668 *
67- * This is primarily useful when using Mapbox GL JS maps in a single page app, in which a user
68- * would navigate between various views that can cause Map instances to constantly be
69- * created and destroyed .
69+ * This is primarily useful when using Mapbox GL JS maps in a single page app,
70+ * in which a user navigates between various views, resulting in
71+ * constant creation and destruction of `Map` instances .
7072 *
7173 * @function prewarm
7274 * @example
0 commit comments