home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 January
/
01_02.iso
/
software
/
netscape62win
/
nim.xpi
/
bin
/
components
/
nsJSAimKeywords.js
< prev
next >
Wrap
Text File
|
2000-09-13
|
2KB
|
56 lines
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Probably need some copyright here!
*/
function nsJSAimKeywords() {
this.keywords = new Array(0);
this.AddKeyword = function(keyword) {
var size = this.keywords.length;
this.keywords[size] = keyword;
}
}
var module = {
registerSelf: function (compMgr, fileSpec, location, type) {
compMgr.registerComponentWithType(this.myCID,
"nsJSAimKeywords",
"@netscape.com/js/aim/keywords;1",
fileSpec, location, true, true,
type);
},
getClassObject: function (compMgr, cid, iid) {
if (!cid.equals(this.myCID))
throw Components.results.NS_ERROR_NO_INTERFACE;
if (!iid.equals(Components.interfaces.nsIFactory))
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
return this.myFactory;
},
canUnload: function () {
},
myCID: Components.ID("{95A3F53C-C85F-11d3-B9FF-0010833594E9}"),
myFactory: {
createInstance: function (outer, iid) {
if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
if (!(iid.equals(Components.interfaces.nsIAimKeywords) ||
iid.equals(Components.interfaces.nsISupports))) {
throw Components.results.NS_ERROR_INVALID_ARG;
}
return new nsJSAimKeywords();
}
}
};
function NSGetModule(compMgr, fileSpec) { return module; }