# extendify/3.1.6/src/QuickEdit/lib/after-animations.js

Extendify, version 3.1.6. 14 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.6/code/src/QuickEdit/lib/after-animations.js
- Raw: https://pluginprobe.com/plugins/extendify/3.1.6/raw/src/QuickEdit/lib/after-animations.js
- Modified: 2026-08-12T16:23:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.1.6/code/src/QuickEdit/lib/after-animations.js#L10-L20`.

```javascript
// A block entering on scroll measures where the animation starts.
export const whenAnimationsSettle = (el, onSettled) => {
	const running = el?.getAnimations?.({ subtree: true }) ?? [];
	if (!running.length) return () => {};
	let dropped = false;
	Promise.all(running.map((animation) => animation.finished))
		.then(() => !dropped && onSettled())
		// A cancelled animation rejects, and means nothing landed to re-measure.
		.catch(() => {});
	return () => {
		dropped = true;
	};
};

```
