Passer au contenu principal

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

NomDescriptionTypeRequis
stateÉtat auquel joindre un rappel.
Valeur possible : ready, error
Exlcusionoui
callbackFonction à exécuter lorsque l'état est déclenchéFonctionoui