Class goog.events.BrowserEvent
code »goog.events.Event
└ goog.events.BrowserEvent
Accepts a browser event object and creates a patched, cross browser event object. The content of this object will not be initialized if no event object is provided. If this is the case, init() needs to be invoked separately.
Constructor
Parameters |
---|
|
Enumerations
|
Instance Methods
Defined in goog.events.BrowserEvent
code »getBrowserEvent ( ) ⇒ Event
Event
Returns |
---|
|
Tests to see which button was pressed during the event. This is really only
useful in IE and Gecko browsers. And in IE, it's only useful for
mousedown/mouseup events, because click only fires for the left mouse button.
Safari 2 only reports the left button being clicked, and uses the value '1'
instead of 0. Opera only reports a mousedown event for the middle button, and
no mouse events for the right button. Opera has default behavior for left and
middle click that can only be overridden via a configuration setting.
There's a nice table of this mess at http://www.unixpapa.com/js/mouse.html.
Parameters |
---|
|
Returns |
|
Whether this has an "action"-producing mouse button.
By definition, this includes left-click on windows/linux, and left-click
without the ctrl key on Macs.
Returns |
---|
|
Defined in goog.events.Event
Instance Properties
Defined in goog.events.BrowserEvent
Node that had the listener attached.
Whether the default platform modifier key was pressed at time of event.
(This is control for all platforms except Mac, where it's Meta.)
For mouseover and mouseout events, the related object for the event.
Defined in goog.events.Event
Whether the default action has been prevented.
This is a property to match the W3C specification at
#events-event-type-defaultPrevented
.
Must be treated as read-only outside the class.
#events-event-type-defaultPrevented
.
Must be treated as read-only outside the class.