Some free JS/web advice from a browser engineer: small DOMs, no descendant selectors, and for goodness sake stop with the sync measurement
-
-
-
Replying to @misantronic
@misantronic : offsetTop, e.g., at a bad time (when layout is dirty); devtools warns about this now1 reply 0 retweets 1 like -
Replying to @slightlylate
@slightlylate thanks for clarifying. We all know its bad, most of the time. I think, we all love and hate the quick'n'dirty solutions.1 reply 0 retweets 0 likes -
Replying to @misantronic
@misantronic: yep. The important thing is *when* you measure. Post-layout is "free" (until styles further dirtied)1 reply 0 retweets 0 likes -
Replying to @slightlylate
@slightlylate How shall one wait for this post-layout blessed time?@misantronic2 replies 0 retweets 0 likes
Replying to @fvsch
@fvsch @misantronic : rAF usually fires post-layout. As always, profile/trace!
3:58 AM - 6 Jul 2015
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.