Storage Api
GL.storage
Section titled “GL.storage”Methods
Section titled “Methods”deleteValue()
Section titled “deleteValue()”deleteValue(
pluginName
,key
):void
Removes a value which has been saved
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
pluginName | string |
key | string |
Returns
Section titled “Returns”void
getValue()
Section titled “getValue()”getValue(
pluginName
,key
,defaultValue
?):any
Gets a value that has previously been saved
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
pluginName | string |
key | string |
defaultValue ? | any |
Returns
Section titled “Returns”any
offAllChanges()
Section titled “offAllChanges()”offAllChanges(
pluginName
):void
Removes all listeners added by onChange for a certain plugin
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
pluginName | string |
Returns
Section titled “Returns”void
offChange()
Section titled “offChange()”offChange(
pluginName
,key
,callback
):void
Removes a listener added by onChange
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
pluginName | string |
key | string |
callback | (value , remote ) => void |
Returns
Section titled “Returns”void
onChange()
Section titled “onChange()”onChange(
pluginName
,key
,callback
): () =>void
Adds a listener for when a plugin’s stored value with a certain key changes
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
pluginName | string |
key | string |
callback | (value , remote ) => void |
Returns
Section titled “Returns”Function
Returns
Section titled “Returns”void
setValue()
Section titled “setValue()”setValue(
pluginName
,key
,value
):void
Sets a value which can be retrieved later, through reloads
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
pluginName | string |
key | string |
value | any |
Returns
Section titled “Returns”void