Drag And Drop
operagx_drag_and_dropPerform a real mouse drag between two elements or coordinates to trigger sortable lists, sliders, and canvas handles that depend on genuine mousemove events.
Instructions
Performs a real mouse-down / move / mouse-up drag between two points or elements, so drag handlers relying on genuine mousemove events (sortable lists, sliders, canvas handles) receive the motion they expect.
Args:
tabId / tabIndex / matchUrl / matchTitle (optional): which tab.
from / to: each { elementId? | selector? | x?+y? }, identifying the start and end points.
steps (number, default 10): intermediate mousemove steps between from and to.
Returns: { "ok": true, "from": { "x": number, "y": number, "selector"?: string }, "to": { "x": number, "y": number, "selector"?: string } }
Examples:
Use when: "drag item A onto the trash icon" -> map_elements for both elementIds, then drag_and_drop from item A's id to the trash icon's id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| steps | No | Intermediate move steps, for drag handlers that need motion events. | |
| tabId | No | Tab id from operagx_list_tabs. Omit to use the first open tab. | |
| matchUrl | No | Pick the tab whose URL contains this substring. | |
| tabIndex | No | Zero-based tab index, alternative to tabId. | |
| matchTitle | No | Pick the tab whose title contains this substring. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| to | Yes | ||
| from | Yes |