UserSettings
Extends:
storing/loading user settings/ sending to the user and in localstorage etc.
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Private Members | ||
private |
_LOCALSTORAGE_KEY: string |
|
private |
_lsSettings: * |
|
private |
_serverDelay: * |
|
private |
_settings: {} |
|
private |
_wasLoaded: boolean |
Method Summary
Public Methods | ||
public |
get(key: *, defaultValue: undefined): * |
|
public |
getAll(): * |
|
public |
getLS(key: *): * |
|
public |
init() |
|
public |
load(settings: *) |
|
public |
reset() |
|
public |
save() |
|
public |
set(key: *, value: *) |
|
public |
setLS(key: *, value: *) |
Inherited Summary
From class Events | ||
public |
off: * |
|
public |
on: * |
|
private |
_eventCallbacks: {} |
|
private |
_listeners: {} |
|
private |
_log: * |
|
private |
_logEvents: boolean |
|
private |
_logName: string |
|
public |
addEventListener(which: *, cb: *, idPrefix: string): string add event listener |
|
public |
emitEvent(which: string, param1: *, param2: *, param3: *, param4: *, param5: *, param6: *) emit event |
|
public |
hasEventListener(id: *, cb: *): boolean check event listener registration |
|
public |
hasListenerForEventName(eventName: *): boolean check event listener by name |
|
public |
logEvents(enabled: boolean, logName: string) enable/disable logging of events for the class |
|
public |
removeEventListener(id: *, cb: *) rempve event listener registration |
Public Constructors
Private Members
private _LOCALSTORAGE_KEY: string source
private _lsSettings: * source
private _serverDelay: * source
private _settings: {} source
private _wasLoaded: boolean source
Public Methods
public get(key: *, defaultValue: undefined): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
defaultValue | undefined |
|
Return:
* |
public init() source
public load(settings: *) source
Params:
Name | Type | Attribute | Description |
settings | * |
public reset() source
public save() source
public set(key: *, value: *) source
Params:
Name | Type | Attribute | Description |
key | * | ||
value | * |
public setLS(key: *, value: *) source
Params:
Name | Type | Attribute | Description |
key | * | ||
value | * |