FANDOM


Namespace Railgun.Storage

A wrapper object defining Railgun's storage namespace, which is responsible for handling communications with the Railgun server.

Field Summary
Field AttributesField Name and Description
<static> <constant>  
Railgun.Storage.domain
The domain where the Railgun server is located.
<static>  
Railgun.Storage.iframe
A reference to the iframe HTML element which is appended to the body of the main page when initialized in Railgun.Storage.init().
<static>  
Railgun.Storage.serverState
A copy of all the properties of the RailgunServer object.
<static>  
Railgun.Storage.storageState
A copy of all the contents of localStorage provided by the server upon pageload.

Method Summary

Method AttributesMethod Name and Description
<static>  
Railgun.Storage.init()
The initialization method for the Storage object.
<static>  
Railgun.Storage.sendRequest(request)
The main line of communication from client to server.

Field Detail

<static> <constant> {String}Railgun.Storage.domain
The domain where the Railgun server is located.
Default Value:
"http://railgunscript.wikia.com"
<static> {Object}Railgun.Storage.iframe
A reference to the iframe HTML element which is appended to the body of the main page when initialized in Railgun.Storage.init(). The client communicates with the server by issuing postMessage requests to the iframe's contentWindow property.
See:
Railgun.Storage.init()
<static> {Object}Railgun.Storage.serverState
A copy of all the properties of the RailgunServer object. This property is initialized in Railgun.initProcessServerResponse().
See:
Railgun.initProcessServerResponse()
<static> {Object}Railgun.Storage.storageState
A copy of all the contents of localStorage provided by the server upon pageload. This property is initialized in Railgun.initProcessServerResponse().
See:
Railgun.initProcessServerResponse()

Method Detail

  • <static> Railgun.Storage.init()
    The initialization method for the Storage object. This method loads the server into an iframe and appends it to the body of the document.
  • <static> Railgun.Storage.sendRequest(request)
    The main line of communication from client to server. This method accepts a request object as a parameter, converts it to JSON and sends it to the server via iframe.contentWindow.postMessage(). Sample usage:
    Railgun.Storage.sendRequest({
    id : "showSiderail()",
    instruction : "setItem",
    key : "siderailHidden",
    value : false });
    Parameters:
    {Object} request
    a request object to be sent to the server
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.