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); }
internal StyleSheetCollection(GeckoDocument document) { this.List = document._domHtmlDocument.GetStyleSheetsAttribute(); }
internal StyleSheetCollection(mozIDOMWindowProxy window, GeckoDocument document) { _window = window; _list = new Lazy <StyleSheetList>(() => new StyleSheetList((mozIDOMWindowProxy)_window, document.DocumentOrShadowRoot.Value.StyleSheets)); }