If the document is already loaded, execute the function now