Methods
getLastMatch
- getLastMatch(): undefined | T
Returns undefined | T
isMatching
- isMatching(): boolean
Returns boolean
isRunning
- isRunning(): boolean
Returns boolean
start
- start(): Promise<void>
Returns Promise<void>
stop
- stop(): Promise<void>
Returns Promise<void>
Watches a matcher function, and trigger whenever it changes from matching to not.
Remarks
Whenever
waitresolves, it runsmatch, and triggersenterwith the match result, orleavewithout, then wait again.By default,
waitis a function that resolves on every page navigation or mutation.Example
Param: ctx
Context object.
Param: spec
Options for running the watcher.