addHandler
static
void
addHandler
(
element
,
name
,
handler
)
A way to make DOM Object dinamic attaching functions fired at given event.
- Parameters:
-
element <DOM>
the DOM Object on which the events will be fired -
name <String>
the name of the event (i.e. 'click') without 'on' -
handler <Function>
the closure fired on given event
- Returns:
void
bind
static
void
bind
(
element
,
name
,
handler
)
A way to make DOM Object dinamic attaching functions fired at given event.
Internally it calls
Internally it calls
jsbeans.events.addHandler
- Parameters:
-
element <DOM>
the DOM Object on which the events will be fired -
name <String>
the name of the event (i.e. 'click') without 'on' -
handler <Function>
the closure fired on given event
- Returns:
void
getEventTarget
static
DOM
getEventTarget
(
event
)
Returns the DOM Object attached on given {@param}
event
- Parameters:
-
event <event>
- Returns:
DOM
- the DOM Object attached on event
getTarget
static
DOM
getTarget
(
event
)
Returns the DOM Object attached on given {@param}
Internally it calls
event
.Internally it calls
jsbeans.events.getEventTarget
- Parameters:
-
event <event>
- Returns:
DOM
- the DOM Object attached on event
removeHandler
static
void
removeHandler
(
element
,
name
,
handler
)
Removes a previously attached event.
- Parameters:
-
element <DOM>
the DOM Object on which the events will be fired -
name <String>
the name of the event (i.e. 'click') without 'on' -
handler <Function>
the closure fired on given event
- Returns:
void
shortcut
static
void
shortcut
(
shortcutName
,
callback
,
[options]
)
Creates a shortcut, also known as key binding.
FIXME: due to parsing problem it's not possible to bind backslash ('\')
FIXME: due to parsing problem it's not possible to bind backslash ('\')
- Parameters:
-
shortcutName <String>
the shortcut. Ex.: 'CRTL+U' -
callback <Function>
the function fired on pressing givenshortcutName
-
[options] <JSON>
propagate: a_boolean, // if true it enables firing other events (it does not call cancelBubble), default false target: DOM_or_String // a DOM Object (or its id) on which the shortcut will be associated
- Returns:
void
unbind
static
void
unbind
(
element
,
name
,
handler
)
Removes a previously attached event.
Internally it calls
Internally it calls
jsbeans.events.removeHandler
- Parameters:
-
element <DOM>
the DOM Object on which the events will be fired -
name <String>
the name of the event (i.e. 'click') without 'on' -
handler <Function>
the closure fired on given event
- Returns:
void