compat for use inside worker context