Bump js version to 2.40.0 and update docs.