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

v3.1.0 - 7th Sep 2024
Option Triggers

For Rendering:

options.events.onRefresh( element ):

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

options.events.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.events.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.events.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.events.onBooleanRender( element ):

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

options.events.onDecimalRender( element ):

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

options.events.onNumberRender( element ):

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

options.events.onStringRender( element ):

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

options.events.onDateRender( element ):

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

options.events.onFunctionRender( element ):

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

options.events.onNullRender( element ):

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

options.events.onUnknownRender( element ):

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

options.events.onBigIntRender( element ):

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

options.events.onSymbolRender( element ):

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

options.events.onGuidRender( element ):

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

options.events.onColorRender( element ):

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

options.events.onRegExpRender( element ):

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

options.events.onUrlRender( element ):

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

options.events.onImageRender( element ):

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

options.events.onEmailRender( element ):

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

For Data:

options.events.onCopyAll( data ):

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

options.events.onOpenAll( element ):

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

options.events.onCloseAll( element ):

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

options.events.onBackPage( element ):

Fires when moving back a page (when showing arrays as pages).
Parameter: element: 'Object' - The DOM element.

options.events.onNextPage( element ):

Fires when moving forward a page (when showing arrays as pages).
Parameter: element: 'Object' - The DOM element.

options.events.onSetJson( element ):

Fires when the JSON data is changed.
Parameter: element: 'Object' - The DOM element.

options.events.onCopyJsonReplacer( key, value ):

Fires when the "Copy" button is pressed, and gets the result that should be used for values when copying the JSON to the clipboard.
Parameter: key: 'string' - The name of the property.
Parameter: value: 'Object' - The value of the property.

options.events.onJsonEdit( element ):

Fires when a property name/value is edited.
Parameter: element: 'Object' - The DOM element.

options.events.onExport( element ):

Fires when the JSON being viewed is exported.
Parameter: element: 'Object' - The DOM element.

For Clicking:

options.events.onValueClick( value ):

Fires when a a value is clicked.
Parameter: value: 'Object' - The value.
Parameter: type: 'string' - The value type.