only emit pageloaded after the scripts executed