Exemple #1
0
        /// <summary>
        /// 指定したオブジェクトの種類を判定して、適切な MshtmlObject を生成します。
        /// </summary>
        /// <param name="instance">要素か要素の集合か分からないオブジェクトを指定します。</param>
        /// <returns>要素か要素集合のラッパインスタンスを返します。</returns>
        protected static MshtmlObject GetElementOrCollection(object instance)
        {
            if (instance == null)
            {
                return(null);
            }

            try{
                if (GetProperty(instance, "nodeType") != null)
                {
                    return(DomNode.FromObj(instance));
                }
            }catch {}

            return(ElementCollection.FromObj(instance));
        }
Exemple #2
0
 public DomNode replaceNode(DomNode node)
 {
     return(DomNode.FromObj(this.Invoke("replaceNode", node)));
 }
Exemple #3
0
 public DomNode swapNode(DomNode node)
 {
     return(DomNode.FromObj(this.Invoke("swapNode", node)));
 }
Exemple #4
0
 public DomNode removeNode(bool deep)
 {
     return(DomNode.FromObj(this.Invoke("removeNode", deep)));
 }
Exemple #5
0
 public DomNode replaceChild(DomNode newChild, DomNode refChild)
 {
     return(DomNode.FromObj(this.Invoke("replaceChild", newChild, refChild)));
 }
Exemple #6
0
 public DomNode removeChild(DomNode node)
 {
     return(DomNode.FromObj(this.Invoke("removeChild", node)));
 }
Exemple #7
0
 public DomNode insertBefore(DomNode node, DomNode refChild)
 {
     return(DomNode.FromObj(this.Invoke("insertBefore", node, refChild)));
 }
Exemple #8
0
 public DomNode cloneNode(bool deep)
 {
     return(DomNode.FromObj(this.Invoke("cloneNode", deep)));
 }
Exemple #9
0
 //#<<delete
 //------------------------------------------------------------
 //	IHTMLDOMNode
 //------------------------------------------------------------
 //#>>delete
 public DomNode appendChild(DomNode node)
 {
     return(DomNode.FromObj(this.Invoke("appendChild", node)));
 }
Exemple #10
0
 //#>>delete
 //------------------------------------------------------------
 // IHTMLDOMTextNode
 //------------------------------------------------------------
 public DomNode splitText(int offset)
 {
     return(DomNode.FromObj(this.Invoke("splitText", offset)));
 }