All files / src/NodeLike/ParentNodeLike/DocumentFragmentLike DocumentFragmentLike.ts

11.11% Statements 2/18
0% Branches 0/8
0% Functions 0/16
11.11% Lines 2/18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 712x                                                                                                                                           2x
import AbstractDocumentFragmentLike  from './AbstractDocumentFragmentLike';
import IDocumentLike                 from '../DocumentLike/IDocumentLike';
import IElementLike                  from '../ElementLike/IElementLike';
import INonDocumentTypeChildNodeLike from '../../INonDocumentTypeChildNodeLike'
class DocumentFragmentLike extends AbstractDocumentFragmentLike {
  get nodeType(): 11 {
    return 11;
  }
 
  get nodeName(): '#document-fragment' {
    return '#document-fragment';
  }
 
  get nodeValue(): null {
    return null;
  }
  
  get textContent(): null {
    return null;
  }
 
  get ownerDocument(): IDocumentLike {
    return this.__ownerDocument;
  }
 
  get parentNode(): null {
    return null;
  }
 
  get parentElement(): null {
    return null;
  }
 
  get previousSibling(): null {
    return null;
  }
 
  get nextSibling(): null {
    return null;
  }
 
  get childNodes(): Array<INonDocumentTypeChildNodeLike> {
    return this.__childNodes.toArray();
  }
 
  get childElementCount(): number {
    return this.__childNodes.count();
  }
 
  get children(): Array<IElementLike> {
    return this.__children.toArray();
  }
 
  get firstChild(): INonDocumentTypeChildNodeLike | null {
    return this.__childNodes.first() || null;
  }
 
  get lastChild(): INonDocumentTypeChildNodeLike | null {
    return this.__childNodes.last() || null;
  }
 
  get firstElementChild(): IElementLike | null {
    return this.__children.first() || null;
  }
 
  get lastElementChild(): IElementLike | null {
    return this.__children.last() || null;
  }
}
 
export default DocumentFragmentLike;