home *** CD-ROM | disk | FTP | other *** search
/ Minami 83 / MINAMI83.iso / Extra / DivXInstaller.exe / $PLUGINSDIR / GoogleToolbarFirefox.msi / xpi / amulet-jslib / firefox / lang.js < prev    next >
Text File  |  2006-08-07  |  563b  |  23 lines

  1. function alert(msg, opt_title) {
  2. opt_title |= "message";
  3. Cc["@mozilla.org/embedcomp/prompt-service;1"]
  4. .getService(Ci.nsIPromptService)
  5. .alert(null, opt_title, msg.toString());
  6. }
  7. function jsInstanceOf(obj, iid) {
  8. try {
  9. obj.QueryInterface(iid);
  10. return true;
  11. } catch (e) {
  12. if (e == Components.results.NS_ERROR_NO_INTERFACE) {
  13. return false;
  14. } else {
  15. throw e;
  16. }
  17. }
  18. }
  19. function BindToObject(func, obj, opt_A, opt_B, opt_C, opt_D, opt_E, opt_F) {
  20. var args = Array.prototype.splice.call(arguments, 1, arguments.length);
  21. return Function.prototype.bind.apply(func, args);
  22. }
  23.