8.7w+
社区成员
/**
* Handle notifications
*/
observe: function sss_observe(aSubject, aTopic, aData) {
// for event listeners
var _this = this;
switch (aTopic) {
case "domwindowopened": // catch new windows
aSubject.addEventListener("load", function(aEvent) {
aEvent.currentTarget.removeEventListener("load", arguments.callee, false);
_this.onLoad(aEvent.currentTarget);
}, false);
break;
case "domwindowclosed": // catch closed windows
this.onClose(aSubject);
break;