Callback is called on complete or loaded state. It seems that the loaded state is when the script is fully downloaded but not handled.