mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
22d9ccf31a
This is not perfect, but I figured getting most of this stood up will make it easier for other folks to improve, and is a lot better than expecting people to figure most of this out themselves. Some known issues: - alphabetical method ordering isn't necessarily what we want here. I haven't invested heavily in improving this. I think this can be a follow-up. - no markdown or HTML support in sphinx-js so the formatting is... not good sometimes. - types somehow get a bonus `()` chucked after them (so are listed as e.g. `String()` rather than just `String`). Unclear what is causing this; it's happening in other extant documentation, too, so I expect is a sphinx-js issue. Differential Revision: https://phabricator.services.mozilla.com/D161650
46 lines
1.4 KiB
ReStructuredText
46 lines
1.4 KiB
ReStructuredText
EventUtils documentation
|
|
========================
|
|
|
|
``EventUtils``' methods are available in all browser mochitests on the ``EventUtils``
|
|
object.
|
|
|
|
In mochitest-plain and mochitest-chrome, you can load
|
|
``"chrome://mochikit/content/tests/SimpleTest/EventUtils.js"`` using a regular
|
|
HTML script tag to gain access to this set of utilities. In this case, all the
|
|
documented methods here are **not** on a separate object, but available as global
|
|
functions.
|
|
|
|
Mouse input
|
|
-----------
|
|
|
|
.. js:autofunction:: sendMouseEvent
|
|
.. js:autofunction:: EventUtils.synthesizeMouse
|
|
.. js:autofunction:: synthesizeMouseAtCenter
|
|
.. js:autofunction:: synthesizeNativeMouseEvent
|
|
.. js:autofunction:: synthesizeMouseExpectEvent
|
|
|
|
.. js:autofunction:: synthesizeWheel
|
|
.. js:autofunction:: EventUtils.synthesizeWheelAtPoint
|
|
.. js:autofunction:: sendWheelAndPaint
|
|
.. js:autofunction:: sendWheelAndPaintNoFlush
|
|
|
|
Keyboard input
|
|
--------------
|
|
|
|
.. js:autofunction:: sendKey
|
|
.. js:autofunction:: EventUtils.sendChar
|
|
.. js:autofunction:: sendString
|
|
.. js:autofunction:: EventUtils.synthesizeKey
|
|
.. js:autofunction:: synthesizeNativeKey
|
|
.. js:autofunction:: synthesizeKeyExpectEvent
|
|
|
|
Drag and drop
|
|
-------------
|
|
|
|
.. js:autofunction:: synthesizeDragOver
|
|
.. js:autofunction:: synthesizeDrop
|
|
.. js:autofunction:: synthesizeDropAfterDragOver
|
|
.. js:autofunction:: synthesizePlainDragAndDrop
|
|
.. js:autofunction:: synthesizePlainDragAndCancel
|
|
.. js:autofunction:: sendDragEvent
|