# isDuiReady (Client)

> Tells whether a dui's page has finished loading.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Web interface
- **URL**: https://wiki.mymp.gg/en/isDuiReady

## Syntax

```lua
bool isDuiReady(dui dui)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `dui` | `dui` | The dui. |

## Returns

`true` if the page has loaded. `false` while it loads, or with an argument that is not a dui (logs a warning).

## Example

```lua
local dui = createDui("https://example.com", 800, 600)
setTimer(function()
    outputDebugString(isDuiReady(dui) and "loaded" or "still loading")
end, 2000, 1)
```

## See also

- [createDui (Client)](https://wiki.mymp.gg/en/createDui.md): Opens a web page off screen, with a transparent background, and gives it back as an image that can be drawn.
- [setDuiUrl (Client)](https://wiki.mymp.gg/en/setDuiUrl.md): Takes a dui to another address.
- [sendDuiMessage (Client)](https://wiki.mymp.gg/en/sendDuiMessage.md): Sends a message to a dui's page. The page receives it in the window's message event.
