addDefaultAction
addDefaultAction
(
n
,
f
,
force
)
adding a new action to the application layer
- Parameters:
-
n <string>
Name of the action -
f <function>
Listener -
force <boolean>
Process the actions without worry about the flagged value...
addLayer
addLayer
(
layers
,
scope
)
Creating a new behaviors layer...
- Parameters:
-
layers <string||array>
Behaviors layers GUID -
scope <object>
Custom Event default execution scope
fire
fire
(
layer
,
obj
)
Broadcasting the message in the corresponding behavior layer...
- Parameters:
-
layer <string>
Behavior layer GUID -
obj <object>
The function that represent the behavior
getActionName
string
getActionName
(
el
,
depot
)
This method will try to match the classname of the DOM element with the list of actions (literal object)
- Parameters:
-
el <object>
element reference -
depot <object>
list of actions that should be analyzed
- Returns:
string
- first matching action
getAllActions
array
getAllActions
(
el
,
depot
)
This method will try to match the classnames of the DOM element with the list of actions (literal object)
- Parameters:
-
el <Node>
element reference -
depot <object>
object with the list of possibles actions
- Returns:
array
- a collection of strings with the name of the matching actions
getAncestorByClassName
static
void
getAncestorByClassName
(
)
YAHOO.Bubbling.getAncestorByClassName is an alias for getOwnerByClassName
- Returns:
void
getAncestorByTagName
static
void
getAncestorByTagName
(
)
YAHOO.Bubbling.getAncestorByTagName is an alias for getOwnerByTagName
- Returns:
void
getFirstChildByTagName
Node
getFirstChildByTagName
(
el
,
t
)
Getting the first child element based on the tagName
- Parameters:
-
el <Node>
Child element reference -
t <object>
ClassName of the Ancestor
- Returns:
Node
getOwnerByClassName
Node
getOwnerByClassName
(
node
,
tagName
)
Analyzing the element and the ancestor path to find a node with a certain classname
- Parameters:
-
node <Node>
DOM element that should be analyzed -
tagName <String>
DOM event
- Returns:
Node
- DOM Element or null
getOwnerByTagName
Node
getOwnerByTagName
(
node
,
tagName
)
Analyzing the element and the ancestor path to find a node with a certain tag name
- Parameters:
-
node <Node>
DOM element that should be analyzed -
tagName <String>
DOM event
- Returns:
Node
- DOM Element or null
getYUIButton
Object
getYUIButton
(
t
)
getting the real YUI Button reference from a dom element, usually the target for a certain event
- Parameters:
-
t <Node>
dom element reference
- Returns:
Object
onEventTrigger
boolean
onEventTrigger
(
b
,
e
,
m
)
Pipeline method to analyze the events and trigger the corresponding actions
- Parameters:
-
b <String>
Layer that should be analyzed (navigate, repaint, property, etc) -
e <Event>
DOM event -
m <Object>
Default arguments that should be shipped with the action execution
- Returns:
boolean
- true if one of the listeners stopped the event
onKeyPressedTrigger
boolean
onKeyPressedTrigger
(
args
,
e
,
m
)
Pipeline method to analyze key strokes events and trigger the corresponding actions
- Parameters:
-
args <String>
Literal object with the event information (target, char, etc). Useful if you want to fake this event. -
e <Event>
DOM event -
m <Object>
Default arguments that should be shipped with the action execution
- Returns:
boolean
- true if one of the listeners stopped the event
processingAction
processingAction
(
layer
,
args
,
actions
,
force
)
Processing an action based on the classname of the target element...
- Parameters:
-
layer <string>
Behavior layer GUID -
args <object>
Event object (extended) -
actions <object>
List of available behaviors... -
force <boolean>
Process the actions without worry about the flagged value...
subscribe
subscribe
(
layer
,
bh
)
Subscribing an behavior to certain behaviors layer...
- Parameters:
-
layer <string>
Behavior layer GUID -
bh <object>
The function that represent the behavior
virtualTarget
boolean
virtualTarget
(
e
,
el
)
Analyzing the target and the related target elements to see if the action was within a certain element
- Parameters:
-
e <Event>
event reference -
el <Node>
DOM element reference
- Returns:
boolean