MediaWiki talk:AjaxRC/beta.js

Global dev.ajaxrc object
Whilst I think you had the right idea Roo, you're implementation is a little strange. For example, let's assume I ran dev.ajaxRC.toggleAjaxReload. It'll return an error as storage is not defined in the global scope, or won't be what it needs to be for this. If functions will move to another function without user interaction between movement they need to be named as an extension of the relevant global if you're exposing it as a global.

To use an example, see MiniComplete/code.js. Each function is under the dev.minicomplete global in case the load function needs to be run more than once (it does in the majority of cases it's designed for). If each function was set up as /beta.js here is it would cause errors as the functions are undefined.