[EMAIL PROTECTED] wrote: > I see what you were saying. But how big of the chance will I run into > that the coordinates I get is before the reflow
All the DOM methods for getting coordinates process any pending parser, style, and layout notifications. So the chance that you will get the wrong coordinates for the reason above is more or less the same as the probability of your CPU or RAM making an error. ;) > or worse, a zero width point outside of the screen? What would trigger this? Note that an actual <div> can be "a zero width point outside of the screen" just by setting "width: 0; height: 0" and positioning it outside the viewport. > The thing I am trying to do is to > place a flashing icon by the corner of newly created element. So it's > essential to have the "right" coordinates. getBoundingClientRect will do that, for this definition of "right". > Only if there is a way > for me to update them sometime later accordingly. What do you suggest > for how to handle this async task? We don't send out any notifications on layout changes, really, so you might want to just poll (get the coordinates every so often, off a timer). -Boris _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

