We heavily use the Google Closure compiler and libraries [1].
goog.require('x') signifies to the compiler that the file which
contains goog.provide('x') must be included, and it will provide a
definition for x.
Our bot namespace lives at $TRUNK/javascript/atoms. bot.dom is
accordingly defined in $TRUNK/javascript/atoms/dom.js
We also have tests for the bot namespace at $TRUNK/javascript/atoms/
test - they can be run by opening the html file in your browser you
want to test in; for some of the tests, they need to actually be run
from a host, rather than a file:// URL; there are instructions for
this, as well as more information, at
https://code.google.com/p/selenium/wiki/AutomationAtoms
Hope this
1:
https://code.google.com/closure/