dojo/mouse (version 1.10)

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");
    });

Property Summary

  • enterThis is an extension event for the mouseenter that IE provides, emulating the behavior on other browsers.
  • leaveThis is an extension event for the mouseleave that IE provides, emulating the behavior on other browsers.

Method Summary

  • _eventHandler(type,selectHandler)
  • isLeft() Test an event object (from a mousedown event) to see if the left button was pressed.
  • isMiddle() Test an event object (from a mousedown event) to see if the middle button was pressed.
  • isRight() Test an event object (from a mousedown event) to see if the right button was pressed.
  • wheel(node,listener) This is an extension event for the mousewheel that non-Mozilla browsers provide, emulating the behavior on Mozilla based browsers.

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

_eventHandler(type,selectHandler)
Defined by dojo/mouse
Parameter Type Description
type undefined
selectHandler undefined
Returns:function
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
Error in the documentation? Can’t find what you are looking for? Let us know!