gecko-dev/dom/public/idl/range/Range.idl
1999-06-03 22:38:38 +00:00

51 lines
1.4 KiB
Plaintext

interface Range {
/* IID: { 0xa6cf90ce, 0x15b3, 0x11d2, \
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */
const unsigned short START_TO_START = 0;
const unsigned short START_TO_END = 1;
const unsigned short END_TO_START = 2;
const unsigned short END_TO_END = 3;
readonly attribute Node startParent;
readonly attribute long startOffset;
readonly attribute Node endParent;
readonly attribute long endOffset;
readonly attribute boolean isCollapsed;
readonly attribute Node commonParent;
void setStart(in Node parent, in long offset);
void setStartBefore(in Node sibling);
void setStartAfter(in Node sibling);
void setEnd(in Node parent, in long offset);
void setEndBefore(in Node sibling);
void setEndAfter(in Node sibling);
void collapse(in boolean toStart);
void selectNode(in Node n);
void selectNodeContents(in Node n);
int compareEndPoints(in unsigned short how, in Range srcRange);
void deleteContents();
DocumentFragment extractContents();
DocumentFragment cloneContents();
void insertNode(in Node n);
void surroundContents(in Node n);
Range clone();
DOMString toString();
};
interface NSRange {
/* IID: { 0xa6cf90f2, 0x15b3, 0x11d2, \
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */
DocumentFragment createContextualFragment(in DOMString fragment);
boolean isValidFragment(in DOMString fragment);
};