blob: 5b0fd42a327c26acace05b29a873a2ceb4d6dc28 [file] [log] [blame]
Adrià Vilanova Martínez18d03c42024-04-21 16:43:01 +02001import { NodeMutation, NodeWatcherHandler } from "../../../../nodeWatcher/NodeWatcherHandler";
2
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};