Class widgets.HtmlXulElement
An Element that corresponds to an element of an HTML or Chrome document
Defined in: widgets.js.
Constructor Summary
Method Summary
Constructor Detail
Method Detail
click(left, top)
: Boolean
Clicks on the Element with the left mouse button.
Parameters:
{Number} | left?, Default: 0 | Relative horizontal coordinate inside Element. |
{Number} | top?, Default: 0 | Relative vertical coordinate inside Element. |
Returns:
{Boolean} | true if succeeded, false otherwise. |
doubleClick(left, top)
: Boolean
Double-clicks on the Element with the left mouse button.
Parameters:
{Number} | left?, Default: 0 | Relative horizontal coordinate inside Element. |
{Number} | top?, Default: 0 | Relative vertical coordinate inside Element. |
Returns:
{Boolean} | true if succeeded, false otherwise. |
keyPress(keycode, modifiers)
: Boolean
Performs a key press for the given keycode.
Try to avoid the usage of the ctrlKey and metaKey modifiers if the
shortcut is a combination of Ctrl (Windows/Linux) and Cmd (Mac). In
this case, use accelKey instead which will work across operating systems.
Parameters:
{String} | keycode | Either a literal like 'b' or an enum like 'VK_ESCAPE'. |
{Object} | modifiers?, Default: {} | Indicates modifier keys. true means pressed. |
{Boolean} | modifiers.ctrlKey?, Default: false | The Ctrl key. |
{Boolean} | modifiers.altKey?, Default: false | The Alt/Option key. |
{Boolean} | modifiers.shiftKey?, Default: false | The Shift key. |
{Boolean} | modifiers.metaKey?, Default: false | The Meta/Cmd key. |
{Boolean} | modifiers.accelKey?, Default: false | Ctrl key on Windows/Linux, Cmd key on Mac. |
Returns:
{Boolean} | true if succeeded, false otherwise. |
mouseDown(button, left, top)
: Boolean
Presses the selected mouse button down on the Element.
Parameters:
{Number} | button?, Default: 0 | The id of the button to press (0 - left, 1 - middle, 2 - right). |
{Number} | left?, Default: 0 | Relative horizontal coordinate inside Element. |
{Number} | top?, Default: 0 | Relative vertical coordinate inside Element. |
Returns:
{Boolean} | true if succeeded, false otherwise. |
mouseUp(button, left, top)
: Boolean
Releases the selected mouse button on the Element.
Parameters:
{Number} | button?, Default: 0 | The id of the button to press (0 - left, 1 - middle, 2 - right). |
{Number} | left?, Default: 0 | Relative horizontal coordinate inside Element. |
{Number} | top?, Default: 0 | Relative vertical coordinate inside Element. |
Returns:
{Boolean} | true if succeeded, false otherwise. |