new Sys()
Methods
getConfig(key) → {*}
Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
            
            String | Key setting  | 
        
Returns:
The configuration from key
- Type
 - *
 
hardReset()
off(evt, fn)
Example
sys.off('saveConfig', (e, opt)=> {
	// do something
})
    Parameters:
| Name | Type | Description | 
|---|---|---|
evt | 
            
            String | Event name  | 
        
fn | 
            
            function | Function to trigger  | 
        
on(evt, fn)
- Description:
 Create a new event with JQuery eventing convenience
Equal to$(window).on()
- Source:
 - Since:
 - 4.3.20
 
Example
sys.off('saveConfig', (e, opt)=> {
	// do something
})
    Parameters:
| Name | Type | Description | 
|---|---|---|
evt | 
            
            String | Event name  | 
        
fn | 
            
            function | Function to trigger  | 
        
one(evt, fn)
- Description:
 Run the event once
Trigger an event and immediately removes it
- Source:
 - Since:
 - 4.3.20
 
Parameters:
| Name | Type | Description | 
|---|---|---|
evt | 
            
            String | Event name  | 
        
fn | 
            
            function | Function to trigger  | 
        
setConfig(key, value) → {Boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
            
            String | Key setting  | 
        
value | 
            
            * | Value of the setting  | 
        
Returns:
True if success
- Type
 - Boolean
 
trigger(evt, fn)
Parameters:
| Name | Type | Description | 
|---|---|---|
evt | 
            
            String | Event name  | 
        
fn | 
            
            function | Function to trigger  | 
        
(static) restartApplication()
Events
beforeSaveConfig
- Description:
 Triggered when configuration is about to be saved
- Source:
 - Since:
 - 4.3.20
 
Properties:
| Name | Type | Description | 
|---|---|---|
config | 
            
            Object | The configuration that will be saved (mutable)  | 
        
loadConfig
Properties:
| Name | Type | Description | 
|---|---|---|
config | 
            
            Object | The configuration that will be loaded (mutable)  | 
        
saveConfig
- Description:
 Triggered when configuration is successfully saved
- Source:
 - Since:
 - 4.3.20
 
Properties:
| Name | Type | Description | 
|---|---|---|
config | 
            
            Object | The configuration that has been saved (mutable)  |