Add JS APIs for checking update.