Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 579 of /home/drbiz/public/tools.realism.com/includes/menu.inc).

Revision of Route from Fri, 06/30/2017 - 07:49

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



}

The Route node establishes an event handlig mechanism between the identified source and evet 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). The event name (or type) must also be specified (DOM requirement). 

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.