Used to provide structural templates.
Pattern
t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
| function bindImageLoadEvent(img, callback) { | |
| // if loaded, directly execute callback | |
| if (img.readyState === "complete" || img.complete) { | |
| callback.apply(img); | |
| return true; | |
| } | |
| // otherwise register event | |
| if (img.readyState) { | |
| img.attachEvent("onreadystatechange", function() { | |
| if (img.readyState === "complete") { |