Layout Thrashing Cheat Sheet

From WikiOD

Here is the cheatsheat of Layout Thrashing and basic guide on how to use Layout Thrashing

Layout thrashing[edit | edit source]

{: .-one-column}

Things that cause invalidation[edit | edit source]

Element[edit | edit source]

  • clientHeight
  • clientLeft
  • clientTop
  • clientWidth
  • focus
  • getBoundingClientRect
  • getClientRects
  • innerText
  • offsetHeight
  • offsetLeft
  • offsetParent
  • offsetTop
  • offsetWidth
  • outerText
  • scrollByLines
  • scrollByPages
  • scrollHeight
  • scrollIntoView
  • scrollIntoViewIfNeeded
  • scrollLeft
  • scrollTop
  • scrollWidth {: .-six-column}

MouseEvent[edit | edit source]

  • layerX
  • layerY
  • offsetX
  • offsetY {: .-six-column}

Window[edit | edit source]

  • getComputedStyle
  • scrollBy
  • scrollTo
  • scrollX
  • scrollY {: .-six-column}

Frame, Document & Image[edit | edit source]

  • height
  • width {: .-six-column}

jQuery[edit | edit source]

  • $.fn.offset
  • $.fn.offsetParent
  • $.fn.position
  • $.fn.scrollLeft
  • $.fn.scrollTop
  • $.fn.css(‘…’)
  • $.fn.text(‘…’)
  • $(‘:hidden’)
  • $(‘:contains’) {: .-six-column}

Also see[edit | edit source]

Credit:rstacruz