var req = new XMLHttpRequest(); var url = qaPref.getPref('qa.extension.hermes.url', 'char'); req.open('GET', url, true); req.onreadystatechange = function(evt) { if (req.readyState == 4 && req.status == 200) { if (req.responseXML.getElementsByTagName('notifications') == null) return; var notifs = req.responseXML.getElementsByTagName('notification'); for (var i=0; i<notifs.length; i++) { var notif = notifs[i]; notif = new Notification('xml', notif); notif.serializeToDb(); } } }; req.send(null); }, 
var req = new XMLHttpRequest(); var url = qaPref.getPref('qa.extension.hermes.url', 'char'); req.open('GET', url, true); req.onreadystatechange = function(evt) { if (req.readyState == 4 && req.status == 200) { if (req.responseXML.getElementsByTagName('notifications') == null) return; var notifs = req.responseXML.getElementsByTagName('notification'); for (var i=0; i<notifs.length; i++) { var notif = notifs[i]; notif = new Notification('xml', notif); notif.serializeToDb(); } } }; req.send(null); }, 
   	updateNotificationStore : function() {   		var req = new XMLHttpRequest();   		var url = qaPref.getPref('qa.extension.hermes.url', 'char');   		req.open('GET', url, true);   		req.onreadystatechange = function(evt) {   			if (req.readyState == 4 && req.status == 200) {   				if (req.responseXML.getElementsByTagName('notifications') == null)					return;				var notifs = req.responseXML.getElementsByTagName('notification');				for (var i=0; i<notifs.length; i++) {					var notif = notifs[i];					notif = new Notification('xml', notif);					notif.serializeToDb();				}       			}   		};   		req.send(null);   	},
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/a3a9a2c311afc9d76e4e6bfc036e5897fa988bc1/notifications.js/buggy/testing/extensions/community/chrome/content/notifications.js