Skip to content

Commit

Permalink
[docsprint] Add inline snippet and related examples to popup.setHTML (#…
Browse files Browse the repository at this point in the history
…9538)

* add inline snippet and related examples to popup.setHTML

* update see URLs to docs subdomain
  • Loading branch information
danswick authored Apr 20, 2020
1 parent d54cef2 commit 0f7c8b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ui/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,15 @@ export default class Popup extends Evented {
*
* @param html A string representing HTML content for the popup.
* @returns {Popup} `this`
* @example
* var popup = new mapboxgl.Popup()
* .setLngLat(e.lngLat)
* .setHTML("<h1>Hello World!</h1>")
* .addTo(map);
* @see [Display a popup](https://docs.mapbox.com/mapbox-gl-js/example/popup/)
* @see [Display a popup on hover](https://docs.mapbox.com/mapbox-gl-js/example/popup-on-hover/)
* @see [Display a popup on click](https://docs.mapbox.com/mapbox-gl-js/example/popup-on-click/)
* @see [Attach a popup to a marker instance](https://docs.mapbox.com/mapbox-gl-js/example/set-popup/)
*/
setHTML(html: string) {
const frag = window.document.createDocumentFragment();
Expand Down

0 comments on commit 0f7c8b9

Please sign in to comment.