mirror of
https://github.com/codex-team/editor.js
synced 2024-06-09 09:22:16 +02:00
added some more explanation
This commit is contained in:
parent
398b0118a4
commit
3434e6cba6
|
@ -7,6 +7,9 @@
|
|||
export function isMutationBelongsToElement(mutationRecord: MutationRecord, element: Element): boolean {
|
||||
const { type, target, addedNodes, removedNodes } = mutationRecord;
|
||||
|
||||
/**
|
||||
* Covers all types of mutations happened to the element or it's descendants with the only one exception - removing/adding the element itself;
|
||||
*/
|
||||
if (element.contains(target)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue