Something that appears in the DOM. This is essentially the same as a Node in the browser DOM, but IDomObject represents only things that may appear in the DOM (e.g. not an attribute, document, doctype)
Inheritance: IDomObject, IDomNode
コード例 #1
0
        private void AddParent(IDomObject element, int index)
        {
            DomObject item = element as DomObject;

            item.ParentNode = Owner;
            item.Index      = index;
            if (element.IsIndexed)
            {
                item.Document.DocumentIndex.AddToIndex((IDomIndexedNode)element);
            }
        }
コード例 #2
0
ファイル: NodeList.cs プロジェクト: EvKapskiy/ProgNet2012
        protected void AddParent(IDomObject element, int index)
        {
            DomObject item = (DomObject)element;

            item.ParentNode = Owner;
            item.Index      = index;
            if (element is IDomIndexedNode && !element.IsDisconnected)
            {
                element.Document.AddToIndex((IDomIndexedNode)element);
            }
        }
コード例 #3
0
 private void RemoveParent(IDomObject element)
 {
     if (element.ParentNode != null)
     {
         DomObject item = element as DomObject;
         if (!element.IsDisconnected && element.IsIndexed)
         {
             item.Document.DocumentIndex.RemoveFromIndex((IDomIndexedNode)element);
         }
         item.ParentNode = null;
     }
 }