Skip to content

Commit

Permalink
#450@trivial: Continue on Range implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
capricorn86 committed May 26, 2022
1 parent 74d96d0 commit d065030
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/happy-dom/src/range/Range.ts
Expand Up @@ -2,6 +2,7 @@ import INode from '../nodes/node/INode';
import IDocument from '../nodes/document/IDocument';
import IDocumentFragment from '../nodes/document-fragment/IDocumentFragment';
import DOMRect from '../nodes/element/DOMRect';
import RangeHowEnum from './RangeHowEnum';

/**
* Range.
Expand All @@ -11,6 +12,14 @@ import DOMRect from '../nodes/element/DOMRect';
*/
export default class Range {
public static _ownerDocument: IDocument = null;
public static readonly END_TO_END = RangeHowEnum.endToEnd;
public static readonly END_TO_START = RangeHowEnum.endToStart;
public static readonly START_TO_END = RangeHowEnum.startToEnd;
public static readonly START_TO_START = RangeHowEnum.startToStart;
public readonly END_TO_END = RangeHowEnum.endToEnd;
public readonly END_TO_START = RangeHowEnum.endToStart;
public readonly START_TO_END = RangeHowEnum.startToEnd;
public readonly START_TO_START = RangeHowEnum.startToStart;
public readonly startOffset: number = 0;
public readonly endOffset: number = 0;
public readonly startContainer: INode = null;
Expand Down
8 changes: 8 additions & 0 deletions packages/happy-dom/src/range/RangeHowEnum.ts
@@ -0,0 +1,8 @@
enum RangeHowEnum {
endToEnd = 2,
endToStart = 3,
startToEnd = 1,
startToStart = 0
}

export default RangeHowEnum;

0 comments on commit d065030

Please sign in to comment.