mozilla
Your Search Results

    HTMLIFrameElement.sendMouseEvent()

    Non-standard
    This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

    This API is available on Firefox OS for privileged or certified applications only.

    Summary

    The sendMouseEvent method allows to fake a mouse event and send it to the browser <iframe>'s content.

    Syntax

    instanceOfHTMLIframeElement.sendMouseEvent(type, x, y, button, clickCount, modifiers);

    Parameters

    type
    A string representing the event type. Possible values are mousedown, mouseup, mousemove, mouseover, mouseout, or contextmenu.
    x
    A number representing the x position of the cursor relative to the browser <iframe>'s visible area in CSS pixels.
    y
    A number representing the y position of the cursor relative to the browser <iframe>'s visible area in CSS pixels.
    button
    A number representing which button has been pressed on the mouse: 0 (Left button), 1 (middle button), or 2 (right button).
    clickCount
    Number of clicks that have been performed.
    modifiers
    A number representing a key pressed at the same time the mouse button was clicked:
       1 : The ALT key
       2 : The CONTROL key
       4 : The SHIFT key
       8 : The META key
      16 : The ALTGRAPH key
      32 : The CAPSLOCK key
      64 : The FN key
     128 : The NUMLOCK key
     256 : The SCROLL key
     512 : The SYMBOLLOCK key
    1024 : The WIN key

    Specification

    Not part of any specification.

    See also

    Document Tags and Contributors

    Contributors to this page: kscarfone, teoli, ajaybhat, Jeremie
    Last updated by: teoli,
    Hide Sidebar