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

# lynx: queueMicrotask() static method

APISummary
Send a task to a microtask queue for execution. For more information about microtask, please refer to [here](https://developer.mozilla.org/en-US/docs/Web/API/Window/queueMicrotask)

## Syntax

```ts
queueMicrotask(callback: () => void): void;
```

### Parameters

#### callback

Function object that needs to be sent to the microtask queue.

### Return Value

None（`undefined`）。

## Examples

```tsx
lynx.queueMicrotask(() => {
  console.log('microtask execute.');
});
```

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.lynx.queueMicrotask`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/lynx/queueMicrotask.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| queueMicrotask | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.5) | Yes (3.5) | Yes |

**`queueMicrotask`**

insert a task into microtask queue

