Explanation
DEXTUploadX5 handles events that occur by calling a global function starting with 'onDX5~'. In addition to this way of handling events, it is possible to register event handlers for each component and use them individually, starting with version 3.10.0.0.
When creating a component using the dx5.create method, you can specify which events to use.
dx5.create({
...
events: {
created: /* onDX5Created */,
error: /* onDX5Error */,
beforeItemsAdd: /* onDX5BeforeItemsAdd */,
itemAdding: /* onDX5ItemAdding */,
itemsAdded: /* onDX5ItemsAdded */,
beforeItemsDelete: /* onDX5BeforeItemsDelete */,
...
columnDataBinding: /* onDX5ColumnDataBinding */,
compressWaitingBegin: /* onDX5CompressWaitingBegin */,
compressWaitingCompleted: /* onDX5CompressWaitingCompleted */,
compressWaitingStopped: /* onDX5CompressWaitingStopped */,
dragAndDrop: /* onDX5DragAndDrop */,
}
});
If you declare a duplicate global event handler and an individual event handler:
- Both event handlers are called.
- They are called in the following order: individual handler, then global handler.
- The events whose return values are affected are only affected by the return value of the last event handler called.
Example
You can see the behavior of events in action in the Console tab of the browser's developer mode.