> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# onRuntimeReady

APISummary
JS 环境准备完成时调用。

## 语法

### Android

```java
public void onRuntimeReady();
```

:::note

- 回调在异步线程中。

:::

### iOS

```objc
- (void)lynxViewDidConstructJSRuntime:(LynxView *)view;
```

#### 参数

- `view`: LynxView 实例。

### Harmony

```typescript
public onRuntimeReady(): void;
```

### Desktop (C++)

```cpp
class YourViewClient : public lynx::pub::LynxViewClient {
 public:
  void OnRuntimeReady() override;
};
```

## 兼容性

**Compatibility Table**

**Query:** `lynx-native-api.lynx-view-client.on-runtime-ready`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/lynx-view-client/on-runtime-ready.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| on-runtime-ready | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (3.7) | Yes (3.7) | No |

**`on-runtime-ready`**

Called when JS environment preparation completed.

**Specifications:**

