Type less when using Hype Commands (hypeDocument)


#1

If you got lot’s of code referencing hypeDocument in an internal Hype function you can just bind hypeDocument to this and then things get much shorter.

(function(){
/* write your code in here */

    alert(this.documentId());
    //instead of alert(hypeDocument.documentId());


}.bind(hypeDocument))();


Hope this helps.