Manage the user preferences of the current module.
portal.preferences.addEventListener("saving", (data) => {
// Do a treatment
// ....
portal.preferences.saved({
success: true, // or false accordingly
// message : "The error message in case of no success",
moduleName : "MyAwesomeModule"
});
});
Dependencies:
- ./js/portal.channel.js
- ./js/portal.EventEmitter.js
- Mixes In:
Methods
(static) Preferences#saved(data)
Notified to AskiaPortal that the preferences has been saved
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | State of the saved preferences Properties
|
Events
saving
When the user is saving the preferences.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | Data of the event |