| goog.Disposable | |
| goog.events.Event | goog.Disposable |
| goog.events.BrowserEvent | goog.events.Event |
| goog.events.KeyEvent | goog.events.BrowserEvent |
|
keyCode
:
The adjusted key code.
|
|
charCode
:
The unicode character code.
|
|
repeat
:
Whether this event was generated by keyboard repeat.
|
|
browserEvent
: (Event | null)
Browser event object.
|
disposeInternal()
No description.
|
code » | |||
getBrowserEvent()
⇒ (Event | null)
No description.
Returns:
(Event | null)
The underlying browser event object.
|
code » | |||
init(e, opt_currentTarget)
Accepts a browser event object and creates a patched, cross browser event
object.
Arguments:
|
code » | |||
|
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.
|
code » | |||
|
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:
The result.
|
code » | |||
preventDefault()
No description.
|
code » | |||
stopPropagation()
No description.
|
code » |
dispose()
⇒ undefined
Disposes of the object. If the object hasn't already been disposed of, calls
#disposeInternal. Classes that extend
goog.Disposable should
override #disposeInternal in order to delete references to COM
objects, DOM nodes, and other disposable objects. Reentrant.
Returns:
undefined
Nothing.
|
code » | ||
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method.
Not reentrant. To avoid calling it twice, it must only be called from the
subclass' disposeInternal method. Everywhere else the public
dispose method must be used.
For example:
mypackage.MyClass = function() {
goog.base(this);
// Constructor logic specific to MyClass.
...
};
goog.inherits(mypackage.MyClass, goog.Disposable);
mypackage.MyClass.prototype.disposeInternal = function() {
goog.base(this, 'disposeInternal');
// Dispose logic specific to MyClass.
...
};
|
code » | ||
|
Use #isDisposed instead.
No description.
Returns:
Whether the object has been disposed of.
|
code » | ||
|
No description.
Returns:
Whether the object has been disposed of.
|
code » | ||
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |
|
Whether alt was pressed at time of event.
|
Code » | |
|
Which mouse button was pressed.
|
Code » | |
|
Keycode of key press.
|
Code » | |
|
X-coordinate relative to the window.
|
Code » | |
|
Y-coordinate relative to the window.
|
Code » | |
|
Whether control was pressed at time of event.
|
Code » | |
|
Node that had the listener attached.
|
Code » | |
event_
: (Event | null)
The browser event object.
|
Code » | |
|
Keycode of key press.
|
Code » | |
|
Whether the meta key was pressed at time of event.
|
Code » | |
|
X-coordinate relative to target.
|
Code » | |
|
Y-coordinate relative to target.
|
Code » | |
|
Whether the default platform modifier key was pressed at time of event.
(This is control for all platforms except Mac, where it's Meta.
|
Code » | |
|
For mouseover and mouseout events, the related object for the event.
|
Code » | |
|
X-coordinate relative to the monitor.
|
Code » | |
|
Y-coordinate relative to the monitor.
|
Code » | |
|
Whether shift was pressed at time of event.
|
Code » | |
|
History state object, only set for PopState events where it's a copy of the
state object provided to pushState or replaceState.
|
Code » | |
|
Target that fired the event.
|
Code » |