1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:38:13 +00:00

LibWeb: Implement Range.compareBoundaryPoints

This commit is contained in:
Luke Wilde 2022-01-31 18:13:15 +00:00 committed by Andreas Kling
parent d73fb7e10f
commit a26f1b2ff9
3 changed files with 103 additions and 0 deletions

View file

@ -31,6 +31,16 @@ public:
ExceptionOr<void> set_end_before(Node& node);
ExceptionOr<void> set_end_after(Node& node);
// https://dom.spec.whatwg.org/#dom-range-start_to_start
enum HowToCompareBoundaryPoints : u16 {
START_TO_START = 0,
START_TO_END = 1,
END_TO_END = 2,
END_TO_START = 3,
};
ExceptionOr<i16> compare_boundary_points(u16 how, Range const& source_range) const;
NonnullRefPtr<Range> inverted() const;
NonnullRefPtr<Range> normalized() const;
NonnullRefPtr<Range> clone_range() const;