Example #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));
        }
Example #2
0
        public CookieManager()
        {
            var manager = Xpcom.GetService <nsICookieManager2>("@mozilla.org/cookiemanager;1");

            _cookieManager = Xpcom.QueryInterface <nsICookieManager2>(manager);
        }
Example #3
0
 internal GeckoResponse(nsIRequest request)
 {
     Channel     = Xpcom.QueryInterface <nsIChannel>(request);
     HttpChannel = Xpcom.QueryInterface <nsIHttpChannel>(request);
 }
Example #4
0
        public void Print()
        {
            nsIWebBrowserPrint print = Xpcom.QueryInterface <nsIWebBrowserPrint>(this.DomWindow);

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