MutationHookInfo

Type: Object

Object describing a mutation hook to be registered.

Properties

Name Type Description
[expectedResultType] Number

The type of data returned by valueQuery, use the static properties of evaluateXPath. It is recommended to set this when using the valueQuery.

onEvent MutationHookCallback | MutationHookXQueryFunctionReference

Defines the function to respond the events. We recommend usage of the MutationHookXQueryFunctionReference for a better API experience.

selector XPathTest

The selector specifying the nodes to which to react. Note that this must be in a form of self::para, see Mutation Hooks for more information.

[valueQuery] XPathQuery

When provided, the hook will only trigger when the result of this query changes for any node matching the selector that remains part of a loaded document.

Was this page helpful?