I am working on developing a web app in EOS. I am using scatter browser extension to sign the transactions. During page load, the status of scatter is checked using the following code
const setStatus = () => {
const status = document.getElementById('status');
if(!scatter) {
status.innerText = 'Please install scatter';
}
else if(!scatter.identity) {
status.innerText = 'No identity selected';
}
else{
status.innerText = scatter.identity.name;
}
};
But during the page load, the scatter is not detected and (!scatter)
condition is satisfied even if my scatter is all set. Is there any solution to detect scatter on page load instantly?