Callback when the document has loaded.