on

attaches a handler to an inner event of Vault

void on(string name,function handler, [any context] );

Parameters

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);
});

Related samples

    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