home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 June / PersonalComputerWorld-June2009-CoverdiscCD.iso / Software / Freeware / Firebug 1.3.3 / firebug-1.3.3-fx.xpi / content / firebug / xpcom.js < prev   
Encoding:
JavaScript  |  2009-02-19  |  731 b   |  31 lines

  1. /* See license.txt for terms of usage */
  2.  
  3. function XPCOMUtils() {}
  4.  
  5. (function() {
  6.  
  7. // ************************************************************************************************
  8. // XPCOM Utilities
  9.  
  10. var _CI = Components.interfaces;
  11. var _CC = Components.classes;
  12.  
  13. this.CCSV = function(cName, ifaceName)
  14. {
  15.     return _CC[cName].getService(_CI[ifaceName]);  // if fbs fails to load, the error can be _CC[cName] has no properties
  16. };
  17.  
  18. this.CCIN = function(cName, ifaceName)
  19. {
  20.     return _CC[cName].createInstance(_CI[ifaceName]);
  21. };
  22.  
  23. this.QI = function(obj, iface)
  24. {
  25.     return obj.QueryInterface(iface);
  26. };
  27.  
  28. // ************************************************************************************************
  29.  
  30. }).apply(XPCOMUtils);
  31.