Pecoes Wiki
Register
Advertisement

Namespace Railgun

A wrapper object for all Railgun client methods and modules. In this context,
a "module" refers to a single section tag of the Wikia Rail, as well as all associated
states and behaviors of that entity. All modules are themselves objects in the Railgun
namespace. The Railgun.Storage namespace is not technically considered a module.

Field Summary
Field AttributesField Name and Description
<static>  
Railgun.isDebug
Specifies the debug mode of the Railgun client.
<static>  
Railgun.version
The version of the Railgun client source code.

Method Summary

Method AttributesMethod Name and Description
<static>  
Railgun.init()
Railgun's main initialization method which is called upon pageload.
<static>  
Railgun.initLoadModules()
Loads all modules after all localStorage data has been copied to the Storage namespace.
<static>  
Processes the initialization response from the Railgun server after the retrieve request&#13;has been made by Railgun.initRequestServer().
<static>  
The client's iframe onload event listener that sends a retrieve request to the server to&#13;get all data from localStorage.

Field Detail

<static> {Boolean}Railgun.isDebug
Specifies the debug mode of the Railgun client. In debug mode, the Railgun stylesheet&#13;and Railgun server pages are non-cached, and some extra data is printed to the console&#13;for testing purposes.
Default Value:
false
<static> {String}Railgun.version
The version of the Railgun client source code.

Method Detail

  • <static> Railgun.init()
    Railgun's main initialization method which is called upon pageload. This method is&#13;responsible for preventing Railgun from loading if the usage preconditions are not&#13;met. It also attaches the Railgun stylesheet to the head of the document,&#13;loads the iframe into the document by initializing the Storage object, and&#13;passes execution to Railgun.initRequestServer() when the iframe&#13;has loaded.
    See:
    Railgun.initRequestServer()
    Railgun.Storage.iframe
  • <static> Railgun.initLoadModules()
    Loads all modules after all localStorage data has been copied to the Storage namespace.&#13;This method un-registers Railgun.initProcessServerResponse() as a message event&#13;listener for the window.
    See:
    Railgun.initProcessServerResponse()
  • <static> Railgun.initProcessServerResponse(event)
    Processes the initialization response from the Railgun server after the retrieve request&#13;has been made by Railgun.initRequestServer(). This method initializes the&#13;Railgun.Storage.serverState and Railgun.Storage.storageState&#13;properties in the Storage namespace and then calls Railgun.initLoadModules()
    Parameters:
    {MessageEvent} event
    a message event representing the server's response
    See:
    Railgun.Storage.serverState
    Railgun.Storage.storageState
    Railgun.initLoadModules()
  • <static> Railgun.initRequestServer()
    The client's iframe onload event listener that sends a retrieve request to the server to&#13;get all data from localStorage. Execution passes to &#13;Railgun.initProcessServerResponse() after the server has handled the request.
    See:
    Railgun.initProcessServerResponse()
Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2012-5-30 23:16
Advertisement