INNER CODE UNIT · TypeScript

videoObserver

sindresorhus/caprine · source/autoplay.ts:156

const videoObserver = new MutationObserver(_ => {
	// Select by tag instead of iterating over mutations which is more performant
	const videos = getVideos();
	// If videos were added disable autoplay
	if (videos.length > 0) {
		disableVideoAutoplay(videos);
	}
});

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…