Hello,
As my subject title said, I would like to know what does this code do (into the SAGalleryConsumer sample):
(function(ui) {
var closePopup = ui.closePopup.bind(ui);
var toastPopup = document.getElementById('popupToast');
toastPopup.addEventListener('popupshow', function(ev){
setTimeout(closePopup, 3000);
}, false);
})(window.gear.ui);
Thank you in advance!