Represents a DOM Comment
Inheritance: GeckoNode
Esempio n. 1
0
        internal static GeckoNode CreateWrapper(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));
            }

            nsIDOMComment comment = domObject as nsIDOMComment;

            if (comment != null)
            {
                return(GeckoComment.Create(comment));
            }

            return(new GeckoNode(domObject));
        }