æ¡å¼µæ©è½ã XUL ã¢ããªã«ã¦ã JavaScript ããç¹å®ã® XPCOM ãµã¼ãã¹ãé »ç¹ã«ä½¿ç¨ããã±ã¼ã¹ãããããã¾ãããã®ãããªå ´åã«å¦çãã½ã¼ã¹ã³ã¼ããå¹çåããããã®ãã¯ããã¯ãããã¤ãç´¹ä»ãã¾ããããã§ã¯ãä¾ã¨ã㦠nsIObserverService ãé »ç¹ã«å©ç¨ããã±ã¼ã¹ãæ³å®ãã¾ãããªããCc 㯠Components.classes, Ci 㯠Components.interfaces ã¸ã®åç §ã§ãã æ¹å¼1: æ¯å XPCOM ãµã¼ãã¹ãå¼ã³åºã ç¹ã«å·¥å¤«ãããªãå ´åã以ä¸ã®ããã« XPCOM ãµã¼ãã¹ãå©ç¨ãããã³ã«æ¯åãã®ã¹ã³ã¼ãå ã§å¼ã³åºãæç¶ããè¡ããã¨ã«ãªãã¾ãã var MyExtension = { init: function() { var observerSvc = Cc["@mozilla.org/observer-service;1"].
Firefox ã®ã¢ããªã³ (æ¡å¼µæ©è½ç) ãéçºããéã«ãæåã³ã¼ããå¤æ´ããå¿ è¦ãã§ã¦ãããã¨ããããã¨æãã¾ãã ããã§ã¯ãJavaScript ã®ã³ã¼ãä¸ã®æååã®æåã³ã¼ãã XPCOM *1 ã使ç¨ãã¦å¤æ´ããæ¹æ³ã«ã¤ãã¦è¨ãã¾ãã ããã«æ¸ãã¦ããæ¹æ³ã¯ããã¾ã§ Firefox ã¢ããªã³ä¸ã§å®è¡å¯è½ãªæ¹æ³ã§ãããé常㮠web ãã¼ã¸å ã® JavaScript ãªã©ã§ã¯ä½¿ç¨ã§ãã¾ããã æåã³ã¼ãã®å¤æã¯ã¢ããªã³ããå¤é¨ã®ããã°ã©ã ãªã©ã«æåæ å ±ãéãéãªã©ã«å¿ è¦ã«ãªãã¨æãã¾ãã nsIScriptableUnicodeConverter 使ç¨ããã®ã¯ nsIScriptableUnicodeConverter ã§ãã ããã使ç¨ãããã¨ã§ JavaScript ä¸ã®é常ã®æåå *2 ãå種æåã³ã¼ãã§ã¨ã³ã³ã¼ããããæååã«å¤æããããéã«å種æåã³ã¼ãã§ã¨ã³ã³ã¼ããã
æ ªå¼ä¼ç¤¾ã¯ãªã¢ã³ã¼ãï¼ä¸ç° æ´å¿ SHIMODA Hiroshi http://www.clear-code.com/ æ¬ç« ã§ã¯ï¼JavaScriptã ãã§ã¯è¡ããªãé«åº¦ãªå¦çãå®ç¾ããããï¼XPCOMã®æ´»ç¨æ¹æ³ã解説ãã¾ãï¼ ã¯ããã« JavaScriptã«ã¯ï¼ãã¡ã¤ã«ã®èªã¿æ¸ããæåã³ã¼ãã®å¤æãªã©ã®å¦çãããæ©è½ã¯ããã¾ããï¼ãããã£ãé«åº¦ãªå¦çãè¡ãã«ã¯ï¼ãã以å¤ã®æè¡ãä½µç¨ããå¿ è¦ãããã¾ãï¼Internet Explorerã§ã¯ãã®ããã®ããã¿ã¨ãã¦ActiveX ãããã¾ããï¼Firefox ã§ã¯XPCOMï¼Cross Platform Component Object Modelï¼ã¨ããããã¿ã使ãã¾ãï¼ XPCOMã¨ã¯ XPCOMã¯ï¼ãã©ãããã©ã¼ã ã«ä¾åããªãã³ã³ãã¼ãã³ãï¼ããã°ã©ã ã®é¨åï¼ãéçºããããã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãï¼ã¾ãï¼ãã®ãã¬ã¼ã ã¯ã¼ã¯ã«åã£ã¦éçºããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}