예제 #1
0
        private Gecko.GeckoNode MakeGeckoNodeFromXmlNode(Gecko.GeckoDocument doc, XmlNode xmlElement)
        {
            var result = doc.CreateElement(xmlElement.LocalName);

            foreach (XmlAttribute attr in xmlElement.Attributes)
            {
                result.SetAttribute(attr.LocalName, attr.Value);
            }
            foreach (var child in xmlElement.ChildNodes)
            {
                if (child is XmlElement)
                {
                    result.AppendChild(MakeGeckoNodeFromXmlNode(doc, (XmlElement)child));
                }
                else if (child is XmlText)
                {
                    result.AppendChild(doc.CreateTextNode(((XmlText)child).InnerText));
                }
                else
                {
                    result = result;
                }
            }
            return(result);
        }
예제 #2
0
 internal StyleSheetCollection(GeckoDocument document)
 {
     this.List = document._domHtmlDocument.GetStyleSheetsAttribute();
 }
예제 #3
0
 internal StyleSheetCollection(mozIDOMWindowProxy window, GeckoDocument document)
 {
     _window = window;
     _list   = new Lazy <StyleSheetList>(() => new StyleSheetList((mozIDOMWindowProxy)_window, document.DocumentOrShadowRoot.Value.StyleSheets));
 }