Adrià Vilanova MartÃnez | 18d03c4 | 2024-04-21 16:43:01 +0200 | [diff] [blame] | 1 | import { NodeMutation, NodeWatcherHandler } from "../../../../nodeWatcher/NodeWatcherHandler"; |
| 2 | |
| 3 | export 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 | |
| 12 | export type ConcreteNodeWatcherScriptHandler<Options> = { |
| 13 | new (options: Options): NodeWatcherScriptHandler<Options>; |
| 14 | }; |