Live data from Hacker News

Don't attach tooltips to document.body

atfzl.com

1–10 of 98 posts

Re: Don't attach tooltips to document.body

#2
A remark on the two diagrams following “Then the CSS is parsed and browser creates the CSSOM (CSS Object Model)”: they show body as the root, but would be more accurate if they showed html as be the root and head as hidden by `display: none`.

Consider this style rule set which does just what it looks like:

  head,
  title,
  style,
  script {
    display: block;
  }

Re: Don't attach tooltips to document.body

#7
I imagine another option if you need to assign a node to a class and then measure its size/location (which is probably quite often) that you can basically take some preliminary/initial values, attach the class, and use an onresize handler to trigger a remeasurement once the reflow has completed at a pace of the browser’s own choosing?

Re: Don't attach tooltips to document.body

#10

Yet another browser based leaky abstraction... Looking forward to the inevitable trend flip back to native ui!

Don't hold your breath...

Yes it’s more likely say Microsoft gives up on desktop ui and says meh… use electron!
Post reply on HN