# JavaScript Interface

```
runScript(script)
```

* `script` String

```
runScriptCallback(script, callback)
```

* `script` String
* `callback` String

```
clickIconButton()
```

Click the `app icon button` on floating widget.

```
clickPlayButton()
```

Click the `play button` on floating widget.

```
clickPauseButton()
```

Click the `pause button` on floating widget.

```
clickLogButton()
```

Click the `log button` on floating widget.

```
clickSettingButton()
```

Click the `setting button` on floating widget.

```
clickCloseButton()
```

Click the `close button` on floating widget.

```
setXY(x, y)
```

* `x` Integer
* `y` Integer

Set the position of the floating widget.

```
getX()
```

Returns `Integer` - The x position of the floating widget.

```
getY()
```

Returns `Integer` - The y position of the floating widget.

```
showMenu()
```

Show the menu on floating widget.

```
hideMenu()
```

Hide the menu on floating widget.

```
showPlayButton()
```

Show the `play button` on floating widget.

```
showPauseButton()
```

Show the `pause button` on floating widget.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.robotmon.app/jiao-ben-jiao-xue/api-documents/javascript-interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
