Add observers for stylesheet mutations (#177)

* hack together stylesheet observer

* Add test coverage for insertRule/deleteRule on stylesheets

* Add new observers

* update patch based on changes to master

* Functioning event recording

* Remove print statements

* Fix ID usage and mark add vs remove

* Correct type

Co-authored-by: Jon Perl <perl.jonathan@gmail.com>
This commit is contained in:
David Cramer
2026-04-01 12:00:00 +08:00
committed by GitHub
parent c7140ea8c6
commit 3a0e829884
10 changed files with 273 additions and 64 deletions

View File

@@ -12,6 +12,7 @@ import {
MouseInteractions,
} from '../src/types';
import { Replayer } from '../src';
import { launchPuppeteer } from './utils';
const now = Date.now();
@@ -122,10 +123,7 @@ interface ISuite extends Suite {
describe('replayer', function(this: ISuite) {
before(async () => {
this.browser = await puppeteer.launch({
headless: false,
args: ['--no-sandbox'],
});
this.browser = await launchPuppeteer();
const bundlePath = path.resolve(__dirname, '../dist/rrweb.min.js');
this.code = fs.readFileSync(bundlePath, 'utf8');