From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pl/web/api/range/index.html | 105 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 files/pl/web/api/range/index.html (limited to 'files/pl/web/api/range') diff --git a/files/pl/web/api/range/index.html b/files/pl/web/api/range/index.html new file mode 100644 index 0000000000..cabb00df2c --- /dev/null +++ b/files/pl/web/api/range/index.html @@ -0,0 +1,105 @@ +--- +title: range +slug: Web/API/Range +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Strony_wymagające_dopracowania + - Wszystkie_kategorie +translation_of: Web/API/Range +--- +

{{ ApiRef("DOM") }}Obiekt Range reprezentuje fragment dokumentu, który stanowi węzeł oraz część węzła tekstowego w danym dokumencie.

+ +

A range can be created using the createRange method of the Document object. Range objects can also be retrieved by using the getRangeAt method of the selection object.

+ +

Własności

+ +
+
collapsed
+
Returns a boolean indicating whether the range's start and end points are at the same position.
+
commonAncestorContainer
+
Returns the deepest Node that contains the startContainer and endContainer Nodes.
+
endContainer
+
Returns the Node within which the Range ends.
+
endOffset
+
Returns a number representing where in the endContainer the Range ends.
+
startContainer
+
Returns the Node within which the Range starts.
+
startOffset
+
Returns a number representing where in the startContainer the Range starts.
+
+ +

Metody

+ +

Metody pozycjonowania

+ +

Te metody ustawiają punkt początkowy i końcowy obiektu range.

+ +
+
setStart
+
Ustawia pozycję początkową obiektu range.
+
setEnd
+
Ustawia pozycję końcową obiektu range.
+
setStartBefore
+
Ustawia pozycję początkowa dla obiektu range w odniesieniu do innego węzła.
+
setStartAfter
+
Ustawia pozycję początkowa dla obiektu range w odniesieniu do innego węzła.
+
setEndBefore
+
Ustawia pozycję końcową dla obiektu range w odniesieniu do innego węzła.
+
setEndAfter
+
Ustawia pozycję końcową dla obiektu range w odniesieniu do innego węzła.
+
selectNode
+
Ustawia obiekt range, aby zawierał węzeł wraz z jego zawartością.
+
selectNodeContents
+
Ustawia obiekt range, aby zawierał zawartość węzła.
+
collapse
+
Zawija obiekt range do jednego z jego punktów granicznych.
+
+ +

Metody edytujące

+ +

These methods retrieve Nodes from a range and modify the contents of a range.

+ +
+
cloneContents
+
Returns a document fragment copying the nodes of a Range.
+
deleteContents
+
Removes the contents of a Range from the document.
+
extractContents
+
Moves contents of a Range from the document tree into a document fragment
+
insertNode
+
Insert a node at the start of a Range.
+
surroundContents
+
Moves content of a Range into a new node.
+
+ +

Inne metody

+ +
+
compareBoundaryPoints
+
Porównuje punkty graniczne dwóch obiektów range.
+
cloneRange
+
Zwraca obiekt range z punktami granicznymi identycznymi z klonowanym obiektem range.
+
detach
+
Releases Range from use to improve performance.
+
toString
+
Zwraca tekst z obiektu range.
+
+ +

Metody Gecko

+ +

Ta sekcja opisuje szczególne metody Range Mozilli nie będące częścią specyfikacji W3C DOM.

+ +
+
compareNode {{ Obsolete_inline() }}
+
Zwraca stałą opisującą czy węzeł znajduje się przed, za, wewnątrz lub otacza obiekt range .
+
comparePoint
+
Zwraca -1, 0 lub 1 wskazując czy punkt porównania występuje przed, wewnątrz lub za obiektem range.
+
createContextualFragment
+
Zwraca fragment dokumentu utworzony z danego łańcucha kodu.
+
intersectsNode {{ Obsolete_inline() }}
+
Zwraca wartość Boolean określającą czy dany węzeł przecina obiekt range.
+
isPointInRange
+
Zwraca wartość Boolean określającą czy dany punkt jest zawarty w obiekcie range.
+
-- cgit v1.2.3-54-g00ecf