We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 046936b commit 9b7f8d6Copy full SHA for 9b7f8d6
src/replay/index.ts
@@ -608,6 +608,28 @@ export class Replayer {
608
}
609
break;
610
611
+ case IncrementalSource.StyleSheetRule: {
612
+ const target = mirror.getNode(d.id);
613
+ if (!target) {
614
+ return this.debugNodeNotFound(d, d.id);
615
+ }
616
+
617
+ const styleEl = (target as Node) as HTMLStyleElement;
618
+ const styleSheet = <CSSStyleSheet>styleEl.sheet;
619
620
+ if (d.adds) {
621
+ d.adds.forEach(({ rule, index }) => {
622
+ styleSheet.insertRule(rule, index);
623
+ });
624
625
626
+ if (d.removes) {
627
+ d.removes.forEach(({ index }) => {
628
+ styleSheet.deleteRule(index);
629
630
631
+ break;
632
633
default:
634
635
0 commit comments