blob: 712f533dc1eb914d8b72126a8ebff29040b48eb7 [file] [log] [blame]
Adrià Vilanova Martínez43c75202024-10-19 15:55:15 +02001import { NodeMutation, NodeWatcherHandler } from "../../../../../presentation/nodeWatcher/NodeWatcherHandler";
Adrià Vilanova Martínez18d03c42024-04-21 16:43:01 +02002
3export abstract class NodeWatcherScriptHandler<Options>
4 implements NodeWatcherHandler
5{
6 abstract initialDiscoverySelector?: string;
7 constructor(protected options: Options) {}
8 abstract nodeFilter(nodeMutation: NodeMutation): boolean;
9 abstract onMutatedNode(nodeMutation: NodeMutation): void;
10}
11
12export type ConcreteNodeWatcherScriptHandler<Options> = {
13 new (options: Options): NodeWatcherScriptHandler<Options>;
14};