Namespace: preferences

preferences

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
Name Type Attributes Description
success Boolean

Indicates that the preferences has or not successfully saved.

message String <optional>

Error message when the data has not been correctly saved.

Events

saving

When the user is saving the preferences.

Parameters:
Name Type Description
data Object

Data of the event