1.0.3 • Published 7 months ago
@indicina-dev/indicina-spool-sdk v1.0.3
Indicina Spool SDK
Installation
npm i @indicina-dev/indicina-spool-sdk
Usage Example
# Function to open the popup
IndicinaSpool.openPopup(
'https://www.example.com/widget',
'spool@gmail.com',
'INDXXXX-XXXX-XXXX-XXXX'
);
# Function to close the popup
setTimeout(() => {
IndicinaSpool.closePopup();
}, 5000);
# Function to handle the completion result
function handleCompletion(result) {
console.log('Popup completed with result:', result);
## Your code to handle the result, e.g., update UI, make API calls, etc.
}
# Set the onComplete callback using the IndicinaSpool.onComplete method
IndicinaSpool.onComplete(handleCompletion);