on

attaches a handler to an inner event of Vault

void on(string name,function handler, [any context] );
namestringthe event's name, case-insensitive
handlerfunctionthe handler function
contextanythe value will be accessible as "this" inside of the event handler

Example

vault.events.on("UploadComplete", function(files) {
    console.log(files);
});

Details

See the list of Vault events.

You can attach several handlers to the same event and all of them will be executed. If some of handlers return false, the related operations will be blocked. Event handlers are processed in the same order that they are attached.

See also
Back to top