Corrects case of ultisnip
This commit is contained in:
parent
cc9369a973
commit
fc6328fe42
1 changed files with 6 additions and 6 deletions
|
@ -7,16 +7,16 @@ class ${1:class_name}{
|
||||||
**/
|
**/
|
||||||
constructor(){
|
constructor(){
|
||||||
//Bind this in the following functions to the class
|
//Bind this in the following functions to the class
|
||||||
this.domloaded = this.domloaded.bind(this);
|
this.domLoaded = this.domLoaded.bind(this);
|
||||||
|
|
||||||
//check to see if the dom has loaded yet
|
//check to see if the dom has loaded yet
|
||||||
if(document.readystate == "loading"){
|
if(document.readyState == "loading"){
|
||||||
//if the dom hasn't loaded, wait until it is
|
//if the dom hasn't loaded, wait until it is
|
||||||
document.addeventlistener("readystatechange",this.domloaded);
|
document.addEventListener("readystatechange",this.domLoaded);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
//if it has, run the domloaded function
|
//if it has, run the domloaded function
|
||||||
this.domloaded();
|
this.domLoaded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,9 +24,9 @@ class ${1:class_name}{
|
||||||
/**
|
/**
|
||||||
* this function is run as soon as the dom is loaded
|
* this function is run as soon as the dom is loaded
|
||||||
**/
|
**/
|
||||||
domloaded(){
|
domLoaded(){
|
||||||
//make sure we don't run this twice
|
//make sure we don't run this twice
|
||||||
document.removeEventListener("readystatechange",this.domloaded);
|
document.removeEventListener("readystatechange",this.domLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue