onInit callback

This commit is contained in:
Francisco Hodge 2018-10-06 02:23:38 -04:00
parent 0f1936b03e
commit a321ab9b91

View File

@ -223,6 +223,20 @@ class SimpleKeyboard {
document.addEventListener("touchend", handler);
}
onInit = () => {
if(this.options.debug){
console.log("Initialized");
}
/**
* Caret handling
*/
this.handleCaret();
if(typeof this.options.onInit === "function")
this.options.onInit();
}
render = () => {
/**
* Clear keyboard