How to track position/size change of an element?
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <aeaf7081-9044-4ca8-9404-9bd355011c25@s50g2000hsb.googlegroups.com> |
I am attaching a small icon via absolutely positioned anonymous DIV to certain special elements on my page. Now the page itself might be modified by DOM manipulation (mostly by CSS and JavaScript), which causes the reflow and potential position and size changes for these elements. My question is what is the best way to listen for this? I tried "DOMSubtreeModified" event on BODY and it seemed to work. However, there are way too many events generated and most of them are garbage. Does anyone know a better way of doing it? Please help. Thanks.