rem: alarmWidget.parentNode.removeChild(alarmWidget); 
add: var parent = alarmWidget.parentNode; parent.removeChild(alarmWidget); if (!parent.hasChildNodes()) {  window.close(); } 
context: function onSnoozeAlarm(event){  // i hate xbl..  var alarmWidget = event.target;  var alarmService = Components.classes["@mozilla.org/calendar/alarm-service;1"].getService(Components.interfaces.calIAlarmService);    var duration = Components.classes["@mozilla.org/calendar/duration;1"]                 .createInstance(Components.interfaces.calIDuration);  //XXX figure out a nice UI way to offer other length options  duration.minutes = 5;  alarmService.snoozeEvent(alarmWidget.item, duration);  alarmWidget.parentNode.removeChild(alarmWidget);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d2c3b149cf01f0c13b7b145d983a07a549258e0c/calendar-alarm-dialog.js/clean/calendar/base/content/calendar-alarm-dialog.js