From fc6328fe422f80731bba2cb2239172a675711190 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 20 Apr 2020 22:17:56 +0100 Subject: [PATCH] Corrects case of ultisnip --- UltiSnips/javascript.snippets | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index 5da476a..7390993 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -7,16 +7,16 @@ class ${1:class_name}{ **/ constructor(){ //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 - if(document.readystate == "loading"){ + if(document.readyState == "loading"){ //if the dom hasn't loaded, wait until it is - document.addeventlistener("readystatechange",this.domloaded); + document.addEventListener("readystatechange",this.domLoaded); return; } else { //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 **/ - domloaded(){ + domLoaded(){ //make sure we don't run this twice - document.removeEventListener("readystatechange",this.domloaded); + document.removeEventListener("readystatechange",this.domLoaded); } }