Weblutions Documentation > FaxCAD > Events
Events
This documentation is for when FaxCAD 1.2.2 is released.
Events are a great way to build and develop extensions in FaxStore. Events are always being added and are documented here for your use in extensions or development of FaxCAD.
Suggest an event at the below link if you'd like to see a particular event
Using events is easy as pie, all you do is use the associated name and arguments. Here are some examples.
Listen for an event (on)
faxcad.on('onStart', function(licenseKey, siteDomain) {
console.log(licenseKey);
console.log(siteDomain);
});
Emit events (emit)
const date = Date.now();
faxcad.emit('CreateAuditLog', 'UserID', 'Logged in', `logged in at <t:${date}>`);
Events Dictionary
- on is a listen event that triggers with
faxcad.on()
- emit is to emit an event to the system with
faxcad.emit()
Name | Arguments | Description | Type |
---|---|---|---|
CreateAuditLog | action, note, userId | Generates an audit log. All arguments are required | emit |
onStart | licenseKey, siteDomain | Emits when FaxCad first starts. | on |
Review this page