Skybound.Gecko.GeckoComment.Create C# (CSharp) Méthode

Create() static private méthode

static private Create ( nsIDOMComment comment ) : GeckoComment
comment nsIDOMComment
Résultat GeckoComment
        internal static GeckoComment Create(nsIDOMComment comment)
        {
            return (comment == null) ? null : new GeckoComment(comment);
        }

Usage Example

Exemple #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));
        }