JsonTree.js - Documentation - Binding Options - Custom Triggers

Below is a list of all the binding options custom triggers supported in JsonTree.js, which are fired when specific actions occur.

Download Now

v0.8.0 - 20th Mar 2024
Option Triggers

For Rendering:

options.onRefresh( element ):

Fires when a rendered element is refreshed.
Parameter: element: 'Object' - The element that was refreshed.

options.onBeforeRenderComplete( element ):

Fires before the rendering of the JsonTree.js of an element.
Parameter: element: 'object' - The DOM element that is going to be rendered.

options.onRenderComplete( element ):

Fires when the rendering of the JsonTree.js for an element is complete.
Parameter: element: 'object' - The DOM element that was rendered.

options.onDestroy( element ):

Fires when the element is destroyed (reverted to its original state).
Parameter: element: 'object' - The DOM element that was destroyed.

For Value Rendering:

options.onBooleanRender( element ):

Fires when a boolean value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

options.onDecimalRender( element ):

Fires when a decimal value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

options.onNumberRender( element ):

Fires when a number value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

options.onStringRender( element ):

Fires when a string value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

options.onDateRender( element ):

Fires when a date value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

options.onFunctionRender( element ):

Fires when a function value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

options.onNullRender( element ):

Fires when a null value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

options.onUnknownRender( element ):

Fires when an unknown value is rendered.
Parameter: element: 'Object' - The value element that was rendered.

For Data:

options.onCopyAll( data ):

Fires when all the JSON is copied to the clipboard.
Parameter: data: 'string' - The JSON that was copied to the clipboard.

options.onOpenAll( element ):

Fires when all the JSON nodes are opened.
Parameter: element: 'Object' - The DOM element.

options.onCloseAll( element ):

Fires when all the JSON nodes are closed.
Parameter: element: 'Object' - The DOM element.

For Clicking:

options.onValueClick( value ):

Fires when a a value is clicked.
Parameter: value: 'Object' - The value that was clicked.