Created
July 23, 2017 06:41
-
-
Save kyuwoo-choi/ff179e3eda472aed70c8bd09a13d9112 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
this._disconnectedObserver = new MutationObserver(mutations => { | |
mutations.forEach(mutation => { | |
if (mutation.type === 'childList' && | |
Array.prototype.slice.call(mutation.removedNodes).indexOf(this._el) >= 0) { | |
... | |
} | |
}); | |
}); | |
this._disconnectedObserver.observe(this._el.parentNode, { | |
childList: true | |
}); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment