FANDOM


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 has been made by Railgun.initRequestServer().
<static>  
The client's iframe onload event listener that sends a retrieve request to the server to 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 and Railgun server pages are non-cached, and some extra data is printed to the console 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 responsible for preventing Railgun from loading if the usage preconditions are not met. It also attaches the Railgun stylesheet to the head of the document, loads the iframe into the document by initializing the Storage object, and passes execution to Railgun.initRequestServer() when the iframe 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. This method un-registers Railgun.initProcessServerResponse() as a message event listener for the window.
    See:
    Railgun.initProcessServerResponse()
  • <static> Railgun.initProcessServerResponse(event)
    Processes the initialization response from the Railgun server after the retrieve request has been made by Railgun.initRequestServer(). This method initializes the Railgun.Storage.serverState and Railgun.Storage.storageState 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 get all data from localStorage. Execution passes to 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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.