Can MutationObserver manipulate the same target element and not fire in a loop?

时间:2019-04-16 23:01:20

标签: javascript mutation-observers

I added a mutation observer on a table element for childList and subtree. I did not add attributes config on the observer. Based on the number of columns and available screen width it would hide/show columns by removing/adding a CSS class. Now this table can also be modified by the angular framework which would cause DOM Node modifications on the table. It seems like mutation observer is getting fired in a loop even for the CSS class changes made by the observer. Is this an expected behavior of MutationObserver?

0 个答案:

没有答案