MCPcopy Create free account
hub / github.com/Maps4HTML/MapML.js / _bindMutationObserver

Method _bindMutationObserver

src/layer.js:565–578  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

563 * via _runMutationObserver
564 */
565 _bindMutationObserver() {
566 // mutation observer
567 this._observer = new MutationObserver((mutationList) => {
568 for (let mutation of mutationList) {
569 // the attributes changes should be handled by attributeChangedCallback()
570 if (mutation.type === 'childList') {
571 this._runMutationObserver(mutation.addedNodes);
572 }
573 }
574 });
575 this._observer.observe(this.src ? this.shadowRoot : this, {
576 childList: true
577 });
578 }
579 _attachedToMap() {
580 // set i to the position of this layer element in the set of layers
581 var i = 0,

Callers 1

_onAddMethod · 0.95

Calls 1

_runMutationObserverMethod · 0.95

Tested by

no test coverage detected