From 14289f96e5d6df4ce9e747f054b01efa25bac518 Mon Sep 17 00:00:00 2001 From: iska Date: Mon, 21 Nov 2016 01:23:52 +0100 Subject: [PATCH] Add method declarations to collapse and select nodes in the HTML Range See: https://dom.spec.whatwg.org/#range --- Sources/HTMLRange.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Sources/HTMLRange.h b/Sources/HTMLRange.h index 0206bd2..1a15245 100644 --- a/Sources/HTMLRange.h +++ b/Sources/HTMLRange.h @@ -105,4 +105,28 @@ */ - (void)setEndAfterNode:(HTMLNode *)node; +/** + Collapses this range to its start. + */ +- (void)collapseToStart; + +/** + Collapses this range to its end. + */ +- (void)collapseToEnd; + +/** + Selects the given node in the range. + + @param node The node to select + */ +- (void)selectNode:(HTMLNode *)node; + +/** + Selects the node's contents in the range. + + @param node The node to select the contents. + */ +- (void)selectNodeContents:(HTMLNode *)node; + @end