added some more explanation

This commit is contained in:
Kanstantsin_Vikhor 2024-02-28 15:22:29 +04:00
parent 398b0118a4
commit 3434e6cba6

View file

@ -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;
}