Top Rounds
| We are Hiring! |

_dragDropXY ·

This is a Browser Action API.

_dragDropXY simulates a drag and drop action.
It drags the element and drops it at the given x, y coordinate.

Syntax:

_dragDropXY(draggable, x, y, isRelative)

The parameters are:

  • draggable: HTML Element to be dragged
  • x: x coordinate of drop point on the page
  • y: y coordinate of drop point on the page
  • isRelative: Specifies whether the coordinates are relative to current position of draggable element.

Example:

If _image(“item”) is located at coordinates (50, 150)

_dragDropXY(_image("item"), 100, 300);
will drag the item and drop it at the coordinate (100, 300)
The end result is that the element’s coordinates will be at (100, 300)

_dragDropXY(_image("item"), 100, 300, true);
will drag the item and drop it at the coordinate (50+100, 150+300)
The end result is that the element’s coordinates will be at (150, 450)

Also look at documentation on _dragDrop




---


Top Rounds