LazyLoader keeps track of what is loaded and will call your callback function synchronously if the file is already loaded, so you can safely (and reasonably efficiently) remove the if statement and always call load() here, if you want to simplify.