The goog.events.ActionEvent Class

goog.events.ActionEvent
> goog.events.BrowserEvent
> goog.events.Event

goog.events.ActionEvent(browserEvent)

This class is used for the goog.events.ActionHandler.EventType.ACTION event.

browserEvent {!goog.events.BrowserEvent}
Browser event object.

.altKey {boolean}

Inherited from goog.events.BrowserEvent .

Whether alt was pressed at time of event.

.button {number}

Inherited from goog.events.BrowserEvent .

Which mouse button was pressed.

.charCode {number}

Inherited from goog.events.BrowserEvent .

Keycode of key press.

.clientX {number}

Inherited from goog.events.BrowserEvent .

X-coordinate relative to the window.

.clientY {number}

Inherited from goog.events.BrowserEvent .

Y-coordinate relative to the window.

.ctrlKey {boolean}

Inherited from goog.events.BrowserEvent .

Whether control was pressed at time of event.

.currentTarget {Node|undefined}

Inherited from goog.events.BrowserEvent .

Node that had the listener attached.

.defaultPrevented {boolean}

Inherited from goog.events.Event .

Whether the default action has been prevented. This is a property to match the W3C specification at {@link http://www.w3.org/TR/DOM-Level-3-Events/#events-event-type-defaultPrevented}. Must be treated as read-only outside the class.

.getBrowserEvent()

Inherited from goog.events.BrowserEvent .

returns {Event}
The underlying browser event object.

.init(e, opt_currentTarget)

Inherited from goog.events.BrowserEvent .

Accepts a browser event object and creates a patched, cross browser event object.

e {Event}
Browser event object.
opt_currentTarget {Node=}
Current target for event.

.isButton(button)

Inherited from goog.events.BrowserEvent .

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.

button {goog.events.BrowserEvent.MouseButton}
The button to test for.
returns {boolean}
True if button was pressed.

.isMouseActionButton()

Inherited from goog.events.BrowserEvent .

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 {boolean}
The result.

.keyCode {number}

Inherited from goog.events.BrowserEvent .

Keycode of key press.

.metaKey {boolean}

Inherited from goog.events.BrowserEvent .

Whether the meta key was pressed at time of event.

.offsetX {number}

Inherited from goog.events.BrowserEvent .

X-coordinate relative to target.

.offsetY {number}

Inherited from goog.events.BrowserEvent .

Y-coordinate relative to target.

.platformModifierKey {boolean}

Inherited from goog.events.BrowserEvent .

Whether the default platform modifier key was pressed at time of event. (This is control for all platforms except Mac, where it's Meta.

.preventDefault()

Inherited from goog.events.BrowserEvent .

Prevents the default action, for example a link redirecting to a url.

.propagationStopped_ {boolean}

Inherited from goog.events.Event .

Whether to cancel the event in internal capture/bubble processing for IE.

@suppress
{underscore} Technically public, but referencing this outside this package is strongly discouraged.

.relatedTarget {Node}

Inherited from goog.events.BrowserEvent .

For mouseover and mouseout events, the related object for the event.

.returnValue_ {boolean}

Inherited from goog.events.Event .

Return value for in internal capture/bubble processing for IE.

@suppress
{underscore} Technically public, but referencing this outside this package is strongly discouraged.

.screenX {number}

Inherited from goog.events.BrowserEvent .

X-coordinate relative to the monitor.

.screenY {number}

Inherited from goog.events.BrowserEvent .

Y-coordinate relative to the monitor.

.shiftKey {boolean}

Inherited from goog.events.BrowserEvent .

Whether shift was pressed at time of event.

.state {Object}

Inherited from goog.events.BrowserEvent .

History state object, only set for PopState events where it's a copy of the state object provided to pushState or replaceState.

.stopPropagation()

Inherited from goog.events.BrowserEvent .

Stops event propagation.

.target {Node}

Inherited from goog.events.BrowserEvent .

Target that fired the event.