Listening events
You can specify callbacks in MobbSign
constructor to listen to some events produced by MobbSign:
new MobbSign({
...config,
onDocumentLoaded: () => console.log("document loaded"),
onSignatureAcquired: () => console.log("signature acquired"),
onSignatureDiscarded: () => console.log("signature discarded"),
onSignatureConfirmed: () => console.log("signature confirmed"),
onDocumentSigned: () => console.log("document signed"),
onError: error => console.log("there have been an error", error),
onDone: () => console.log("everything is done :)")
}).then(mobbsign => {
mobbsign.load(`documentId`);
});
NOTE: Check API for a more detailed description of the listeners.