The document object in RightJS has the standard Observer interface, and it also handles the dom-ready event.
The dom-ready event in RightJS is simply called ready and you can assign a listener to it in any of the standard ways:
document.onReady(function() {...});
document.on('ready', function() {...});
document.observe('ready', function() {...});
This event can also be handled the same way with the window object.
observe(String name, Function callback[, args[, ...]]) -> document self
The standard listeners attachment method
DEPRECATED: please use the shorter method on
document.observe(
'ready', function() {...});