@wordpress/dom 3.30.0 → 3.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +11 -25
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
@@ -28,8 +28,7 @@ _Returns_
|
|
28
28
|
|
29
29
|
### documentHasSelection
|
30
30
|
|
31
|
-
Check whether the current document has a selection. This includes focus in
|
32
|
-
input fields, textareas, and general rich-text selection.
|
31
|
+
Check whether the current document has a selection. This includes focus in input fields, textareas, and general rich-text selection.
|
33
32
|
|
34
33
|
_Parameters_
|
35
34
|
|
@@ -41,9 +40,7 @@ _Returns_
|
|
41
40
|
|
42
41
|
### documentHasTextSelection
|
43
42
|
|
44
|
-
Check whether the current document has selected text. This applies to ranges
|
45
|
-
of text in the document, and not selection inside `<input>` and `<textarea>`
|
46
|
-
elements.
|
43
|
+
Check whether the current document has selected text. This applies to ranges of text in the document, and not selection inside `<input>` and `<textarea>` elements.
|
47
44
|
|
48
45
|
See: <https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects>.
|
49
46
|
|
@@ -57,9 +54,7 @@ _Returns_
|
|
57
54
|
|
58
55
|
### documentHasUncollapsedSelection
|
59
56
|
|
60
|
-
Check whether the current document has any sort of (uncollapsed) selection.
|
61
|
-
This includes ranges of text across elements and any selection inside
|
62
|
-
textual `<input>` and `<textarea>` elements.
|
57
|
+
Check whether the current document has any sort of (uncollapsed) selection. This includes ranges of text across elements and any selection inside textual `<input>` and `<textarea>` elements.
|
63
58
|
|
64
59
|
_Parameters_
|
65
60
|
|
@@ -71,8 +66,7 @@ _Returns_
|
|
71
66
|
|
72
67
|
### focus
|
73
68
|
|
74
|
-
Object grouping `focusable` and `tabbable` utils
|
75
|
-
under the keys with the same name.
|
69
|
+
Object grouping `focusable` and `tabbable` utils under the keys with the same name.
|
76
70
|
|
77
71
|
### getFilesFromDataTransfer
|
78
72
|
|
@@ -88,9 +82,7 @@ _Returns_
|
|
88
82
|
|
89
83
|
### getOffsetParent
|
90
84
|
|
91
|
-
Returns the closest positioned element, or null under any of the conditions
|
92
|
-
of the offsetParent specification. Unlike offsetParent, this function is not
|
93
|
-
limited to HTMLElement and accepts any Node (e.g. Node.TEXT_NODE).
|
85
|
+
Returns the closest positioned element, or null under any of the conditions of the offsetParent specification. Unlike offsetParent, this function is not limited to HTMLElement and accepts any Node (e.g. Node.TEXT_NODE).
|
94
86
|
|
95
87
|
_Related_
|
96
88
|
|
@@ -122,8 +114,7 @@ _Returns_
|
|
122
114
|
|
123
115
|
### getRectangleFromRange
|
124
116
|
|
125
|
-
Get the rectangle of a given Range. Returns `null` if no suitable rectangle
|
126
|
-
can be found.
|
117
|
+
Get the rectangle of a given Range. Returns `null` if no suitable rectangle can be found.
|
127
118
|
|
128
119
|
_Parameters_
|
129
120
|
|
@@ -135,8 +126,7 @@ _Returns_
|
|
135
126
|
|
136
127
|
### getScrollContainer
|
137
128
|
|
138
|
-
Given a DOM node, finds the closest scrollable container node or the node
|
139
|
-
itself, if scrollable.
|
129
|
+
Given a DOM node, finds the closest scrollable container node or the node itself, if scrollable.
|
140
130
|
|
141
131
|
_Parameters_
|
142
132
|
|
@@ -148,8 +138,7 @@ _Returns_
|
|
148
138
|
|
149
139
|
### insertAfter
|
150
140
|
|
151
|
-
Given two DOM nodes, inserts the former in the DOM as the next sibling of
|
152
|
-
the latter.
|
141
|
+
Given two DOM nodes, inserts the former in the DOM as the next sibling of the latter.
|
153
142
|
|
154
143
|
_Parameters_
|
155
144
|
|
@@ -162,8 +151,7 @@ _Returns_
|
|
162
151
|
|
163
152
|
### isEmpty
|
164
153
|
|
165
|
-
Recursively checks if an element is empty. An element is not empty if it
|
166
|
-
contains text or contains elements with attributes such as images.
|
154
|
+
Recursively checks if an element is empty. An element is not empty if it contains text or contains elements with attributes such as images.
|
167
155
|
|
168
156
|
_Parameters_
|
169
157
|
|
@@ -175,8 +163,7 @@ _Returns_
|
|
175
163
|
|
176
164
|
### isEntirelySelected
|
177
165
|
|
178
|
-
Check whether the contents of the element have been entirely selected.
|
179
|
-
Returns true if there is no possibility of selection.
|
166
|
+
Check whether the contents of the element have been entirely selected. Returns true if there is no possibility of selection.
|
180
167
|
|
181
168
|
_Parameters_
|
182
169
|
|
@@ -263,8 +250,7 @@ _Returns_
|
|
263
250
|
|
264
251
|
### isTextField
|
265
252
|
|
266
|
-
Check whether the given element is a text field, where text field is defined
|
267
|
-
by the ability to select within the input, or that it is contenteditable.
|
253
|
+
Check whether the given element is a text field, where text field is defined by the ability to select within the input, or that it is contenteditable.
|
268
254
|
|
269
255
|
See: <https://html.spec.whatwg.org/#textFieldSelection>
|
270
256
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/dom",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.31.0",
|
4
4
|
"description": "DOM utilities module for WordPress.",
|
5
5
|
"author": "The WordPress Contributors",
|
6
6
|
"license": "GPL-2.0-or-later",
|
@@ -29,10 +29,10 @@
|
|
29
29
|
"sideEffects": false,
|
30
30
|
"dependencies": {
|
31
31
|
"@babel/runtime": "^7.16.0",
|
32
|
-
"@wordpress/deprecated": "^3.
|
32
|
+
"@wordpress/deprecated": "^3.31.0"
|
33
33
|
},
|
34
34
|
"publishConfig": {
|
35
35
|
"access": "public"
|
36
36
|
},
|
37
|
-
"gitHead": "
|
37
|
+
"gitHead": "d61700b9f1c72ba0b030fc815ef1685b4f4031ec"
|
38
38
|
}
|