Maneira simples de notificações HTML5 na forumeiros
usando a função
Até a próxima!
- Código:
function notify(sTitle,sContent,sImage,sUrl) {
Notification.requestPermission(function() {
var notification = new Notification(sTitle, {
icon: sImage,
body: sContent
});
if(sUrl)notification.onclick = function() {top.location.href=sUrl}
});
}
usando a função
- Código:
document.addEventListener("DOMContentLoaded", function() {
notify('Titulo','Conteudo','http://www.iconesbr.net/iconesbr/2008/12/7326/7326_256x256.png','http://jscript.forumeiros.com/')
});
Até a próxima!