コード例 #1
0
        internal static GeckoNode Create(nsIDOMNode domObject)
        {
            if (domObject == null)
            {
                return(null);
            }

            nsIDOMHTMLElement element = Xpcom.QueryInterface <nsIDOMHTMLElement>(domObject);

            if (element != null)
            {
                return(GeckoElement.Create(element));
            }

            nsIDOMAttr attr = Xpcom.QueryInterface <nsIDOMAttr>(domObject);

            if (attr != null)
            {
                return(GeckoAttribute.Create(attr));
            }

            return(new GeckoNode(domObject));
        }
コード例 #2
0
ファイル: CookieManager.cs プロジェクト: Porfoore/DirtyGecko
        public CookieManager()
        {
            var manager = Xpcom.GetService <nsICookieManager2>("@mozilla.org/cookiemanager;1");

            _cookieManager = Xpcom.QueryInterface <nsICookieManager2>(manager);
        }
コード例 #3
0
 internal GeckoResponse(nsIRequest request)
 {
     Channel     = Xpcom.QueryInterface <nsIChannel>(request);
     HttpChannel = Xpcom.QueryInterface <nsIHttpChannel>(request);
 }
コード例 #4
0
ファイル: GeckoDom.cs プロジェクト: LoveChiba/jg.editor
        public void Print()
        {
            nsIWebBrowserPrint print = Xpcom.QueryInterface <nsIWebBrowserPrint>(this.DomWindow);

            print.Print(null, null);
        }
コード例 #5
0
 public GeckoStyleSheetService()
 {
     StyleSheetService = Xpcom.GetService <nsIStyleSheetService>("@mozilla.org/content/style-sheet-service;1");
     StyleSheetService = Xpcom.QueryInterface <nsIStyleSheetService>(StyleSheetService);
 }