Skip to content

Instantly share code, notes, and snippets.

kosso / WP_API_OAuth_Test_client.php
Last active Sep 16, 2021
Test PHP client for Wordpress REST API v2.0 / OAuth1.0a 0.3.0
View WP_API_OAuth_Test_client.php
//opcache_reset(); // Disable local dev MAMP cache
Tested with Wordpress 4.7.1
WordPress REST API - OAuth 1.0a Server v.0.3.0 -
paulirish /
Last active Jan 28, 2022
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent