Route

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in book_prev() (line 775 of /home/drbiz/public/tools.realism.com/modules/book/book.module).

Primary tabs

Route : XSeen {
SFString
[]
source
ID value
SFString
[]
event
Event name
SFString
[]
destination
ID value
SFString
[]
field
Field name
SFString
[]
handler
Function name



}

The Route node establishes an event handlig mechanism between the identified source and event type to the specified destination. All events handled with Route shall be DOM events, but they need not be DOM-defined events - custom events may be used. The event source is specified by the value of the id attribute (see Future Notes). Unless handler is specified, the event name (or type) must also be specified. 

The destination node/tag is specified by the value of the id attribute (see Future Notes), along with the field in the node to receive the event. 

handler is the name of a JavaScript function defined at the DOM window level. If present, this field overrides event, destination, and field to capture all XSeen events originating from the node specified in source and any of it's children. This function is a normal DOM event handler that receives the XSeen event (see Internals document for structure).

 

Future note

  1. Allow the source to specify any unique node via class, ID, and node name.
  2. Allow source to specify a collection of nodes. An event handler would be created for each one
  3. Allow desination to specify any unique node
  4. Allow destination to specify a collection of nodes. A listener would be established for each destination node.
  5. Allow developer to specify a custom event handler (JavaScript code) that processes the event prior to passing it to the node's field's event handler.