Interface Range

継承元:
(無し)
プロパティ:
collapsed, commonAncestorContainer, endContainer, endOffset, startContainer, startOffset
メソッド:
cloneContents, cloneRange, collapse, compareBoundaryPoints, deleteContents, detach, extractContents, insertNode, selectNode, selectNodeContents, setEnd, setEndAfter, setEndBefore, setStart, setStartAfter, setStartBefore, surroundContents, toString

プロパティ:

メソッド:

IDL 定義:

// Introduced in DOM Level 2:
interface Range {
  readonly attribute Node             startContainer;
                                        // raises(DOMException) on retrieval
  readonly attribute long             startOffset;
                                        // raises(DOMException) on retrieval
  readonly attribute Node             endContainer;
                                        // raises(DOMException) on retrieval
  readonly attribute long             endOffset;
                                        // raises(DOMException) on retrieval
  readonly attribute boolean          collapsed;
                                        // raises(DOMException) on retrieval
  readonly attribute Node             commonAncestorContainer;
                                        // raises(DOMException) on retrieval
  void               setStart(in Node refNode, 
                              in long offset)
                                        raises(RangeException, 
                                               DOMException);
  void               setEnd(in Node refNode, 
                            in long offset)
                                        raises(RangeException, 
                                               DOMException);
  void               setStartBefore(in Node refNode)
                                        raises(RangeException, 
                                               DOMException);
  void               setStartAfter(in Node refNode)
                                        raises(RangeException, 
                                               DOMException);
  void               setEndBefore(in Node refNode)
                                        raises(RangeException, 
                                               DOMException);
  void               setEndAfter(in Node refNode)
                                        raises(RangeException, 
                                               DOMException);
  void               collapse(in boolean toStart)
                                        raises(DOMException);
  void               selectNode(in Node refNode)
                                        raises(RangeException, 
                                               DOMException);
  void               selectNodeContents(in Node refNode)
                                        raises(RangeException, 
                                               DOMException);
  // CompareHow
  const unsigned short      START_TO_START                 = 0;
  const unsigned short      START_TO_END                   = 1;
  const unsigned short      END_TO_END                     = 2;
  const unsigned short      END_TO_START                   = 3;
  short              compareBoundaryPoints(in unsigned short how, 
                                           in Range sourceRange)
                                        raises(DOMException);
  void               deleteContents()
                                        raises(DOMException);
  DocumentFragment   extractContents()
                                        raises(DOMException);
  DocumentFragment   cloneContents()
                                        raises(DOMException);
  void               insertNode(in Node newNode)
                                        raises(DOMException, 
                                               RangeException);
  void               surroundContents(in Node newParent)
                                        raises(DOMException, 
                                               RangeException);
  Range              cloneRange()
                                        raises(DOMException);
  DOMString          toString()
                                        raises(DOMException);
  void               detach()
                                        raises(DOMException);
};


Issued: / Revised: / All rights reserved. © 2002-2016 TAKI