setDOMContent method

Popup setDOMContent(
  1. Node htmlNode
)

Sets the popup's content to the element provided as a DOM node.

@param htmlNode A DOM node to be used as content for the popup. @returns {Popup} this @example // create an element with the popup content var div = window.document.createElement('div'); div.innerHTML = 'Hello, world!'; var popup = new mapboxgl.Popup() .setLngLat(e.lngLat) .setDOMContent(div) .addTo(map);

Implementation

Popup setDOMContent(Node htmlNode) =>
    Popup.fromJsObject(jsObject.setDOMContent(htmlNode));