dojo/mouse

Summary

This module provide mouse event handling utility functions and exports mouseenter and mouseleave event emulation.

See the dojo/mouse reference documentation for more information.

Examples

Example 1

To use these events, you register a mouseenter like this:

define(["dojo/on", dojo/mouse"], function(on, mouse){
    on(targetNode, mouse.enter, function(event){
        dojo.addClass(targetNode, "highlighted");
    });
    on(targetNode, mouse.leave, function(event){
        dojo.removeClass(targetNode, "highlighted");
    });

Properties

enter

Defined by: dojo/mouse

This is an extension event for the mouseenter that IE provides, emulating the behavior on other browsers.

leave

Defined by: dojo/mouse

This is an extension event for the mouseleave that IE provides, emulating the behavior on other browsers.

Methods

isLeft()

Defined by dojo/mouse

Test an event object (from a mousedown event) to see if the left button was pressed.

isMiddle()

Defined by dojo/mouse

Test an event object (from a mousedown event) to see if the middle button was pressed.

isRight()

Defined by dojo/mouse

Test an event object (from a mousedown event) to see if the right button was pressed.

wheel(node,listener)

Defined by dojo/mouse

This is an extension event for the mousewheel that non-Mozilla browsers provide, emulating the behavior on Mozilla based browsers.

Parameter Type Description
node undefined
listener undefined

Returns: undefined

© 2005–2017 JS Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/mouse.html