Skip to content

Instantly share code, notes, and snippets.

View alexkhismatulin's full-sized avatar

Alex Khismatulin alexkhismatulin

View GitHub Profile
@patrick-fs
patrick-fs / sentry_and_fullstory.js
Last active June 6, 2023 12:56
Integrating Sentry + FullStory without NPM
Sentry.init({
dsn: 'your Sentry DSN', // if you're logged into Sentry, you can find your DSN in ths sample code on this page: https://docs.sentry.io/platforms/javascript/react/
beforeSend(event, hint) {
const error = hint.originalException;
event.extra = event.extra || {};
var _fs = window[window._fs_namespace]];
if (typeof _fs !== 'function') {
event.extra.fullstory = 'FullStory is not installed';
@paulirish
paulirish / what-forces-layout.md
Last active June 26, 2024 20:47
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