Wiki
timesheets / files / loading
load_definitions.js
This module loads timesheets and instantiates timing objects in Timesheet.js. Also, it handles storing the smil objects associated to DOM nodes, and managing 'scopes' of timesheets. The timesheet data it works with are in JSON format, not in XML.
Time definitions are loaded for a given scope. A scope is the context to search for the selectors defined in the timesheet. The default context will be the document (or 'document.body'(?)). Anyway, this concept of contexts appears only in load_definitions.js module, the Timesheeet.js module is independent on these concepts.
The view components in an application define the contexts. This allows to load timesheets for each view. This module associates the timing data among different scopes. ie. since each view module defines its timesheet, there is not a global tree of timing nodes. So this module assembles the views' timing subtrees to form an application-wide hierarchy, ie. link a sub-container with its parent's.
At the moment, it includes also some functions to parse the JSON definitions, to store optimized forms of timing definitions, with aim to speed up creating timing objects. However, it's likely that those funcs will be moved to other module for parsing.
Timesheets.js module does not depened on this module. Thus, I can modify/replace this module and it won't affect to the logic of timing/synchronizing.
Updated