on
Pour joindre un rappel pour différents états de la fenêtre.Predis objet.
Utilisation
predis.on("ready", () => {
// SDK is ready to call other methods e.g createPost
});
predis.on("error", () => {
// catch if there is any error SDK initialization
});
Paramètres
| Nom | Description | Type | Requis |
|---|---|---|---|
state | État auquel joindre un rappel. Valeur possible : ready, error | Exlcusion | oui |
callback | Fonction à exécuter lorsque l'état est déclenché | Fonction | oui |