Is there any non-polling way to detect when a DOM element's size or position have changed?

后端 未结 3 677
逝去的感伤
逝去的感伤 2021-02-01 17:01

For a long time, I\'ve been looking for a way to detect when a DOM element\'s size or position has changed. It could be because the window resized, or because new child elements

3条回答
  •  滥情空心
    2021-02-01 17:21

    You might could do it with CSS animations. Check out http://developer.streak.com/2012/11/how-to-detect-dom-changes-in-css.html and similar. I suppose it won't handle all your requirements though, now that I read through it some more.

提交回复
热议问题