Run javascript immediately, if needed