events.js is part of Aloha Editor project http://www.alohaeditor.org
Aloha Editor ● JavaScript Content Editing Library
Copyright (c) 2010-2015 Gentics Software GmbH, Vienna, Austria.
Contributors http://www.alohaeditor.org/docs/contributing.html
Aloha Editor ● JavaScript Content Editing Library
Copyright (c) 2010-2015 Gentics Software GmbH, Vienna, Austria.
Contributors http://www.alohaeditor.org/docs/contributing.html
Methods
-
Registers an event listener to fire the given callback when a specified
event is triggered on the given object.Name Type Description obj
Element | Document | Window Object which supports events. This includes DOM elements, the Document itself, and the Window object for example. event
string Name of the event for which to register the given callback. handler
function Function to be invoked when event is triggered on the given object. opt_useCapture
boolean optional Optional. Whether to add the handler in the capturing phase. -
This function is missing documentation.
- TODO
-
- Complete documentation.
-
Given an event object, checks whether the ctrl key is depressed.
Name Type Description event
Event -
Returns true if the given value is a native browser event object.
Name Type Description obj
* -
isSelectionEvent(obj){boolean}
-
Returns true if the given value is a Selection Event object as created by
aloha.selections.selectionEvent.Name Type Description obj
* -
Runs the given function after the current event handler returns
to the browser.
Currently implemented just with setTimeout() which is specced to
have a minimum timeout value of 4 milliseconds. Alternate
implementations are possible that are faster, for example:
https://github.com/NobleJS/setImmediateName Type Description fn
function a function to call -
Flags the given event to prevent native handlers from performing default
behavior for it.Name Type Description event
Event -
Detaches the specified event callback from the given event.
Name Type Description obj
Element | Document | Window Object which supports events. This includes DOM elements, the Document itself, and the Window object for example. event
string Name of the event to detach. handler
function Function to be de-registered. opt_useCapture
boolean optional Optional. Must be true if the handler was registered with a true useCapture argument. -
Sets up all editing browser events to call `editor` on the given
document.Name Type Description editor
function doc
Document -
Stops this event from bubbling any further up the DOM tree.
Name Type Description event
Event -
"Suppresses" the given event such that it will not trigger default
behavior and nor propagate. This will prevent any parent handlers up of
the DOM tree from being notified of this event.Name Type Description event
Event