@webalternatif/js-core 1.6.0 → 1.6.3
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/dist/cjs/array.js +13 -1
- package/dist/cjs/dom.js +4 -4
- package/dist/cjs/is.js +5 -5
- package/dist/cjs/onOff.js +2 -2
- package/dist/cjs/random.js +6 -6
- package/dist/cjs/string.js +19 -17
- package/dist/cjs/utils.js +1 -1
- package/dist/esm/Mouse.js +1 -1
- package/dist/esm/Translator.js +2 -2
- package/dist/esm/array.js +17 -5
- package/dist/esm/dom.js +8 -8
- package/dist/esm/eventDispatcher.js +2 -2
- package/dist/esm/is.js +6 -6
- package/dist/esm/math.js +3 -3
- package/dist/esm/onOff.js +6 -6
- package/dist/esm/random.js +6 -6
- package/dist/esm/string.js +23 -21
- package/dist/esm/stringPrototype.js +2 -2
- package/dist/esm/traversal.js +3 -3
- package/dist/esm/utils.js +3 -3
- package/docs/array.md +57 -0
- package/docs/dom.md +683 -0
- package/docs/eventDispatcher.md +15 -0
- package/docs/is.md +15 -0
- package/docs/math.md +47 -0
- package/docs/mouse.md +15 -0
- package/docs/random.md +15 -0
- package/docs/string.md +145 -0
- package/docs/translator.md +95 -0
- package/docs/traversal.md +159 -0
- package/docs/utils.md +75 -0
- package/package.json +30 -4
- package/types/array.d.ts +2 -2
- package/types/dom.d.ts +4 -4
- package/types/index.d.ts +2 -2
package/docs/dom.md
ADDED
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
# DOM utilities
|
|
2
|
+
|
|
3
|
+
Description of the dom utilities.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import { dom } from '@webalternatif/js-core'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
<!-- GENERATED:dom -->
|
|
15
|
+
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
16
|
+
|
|
17
|
+
## isWindow
|
|
18
|
+
|
|
19
|
+
[src/dom.js:42-44][1]
|
|
20
|
+
|
|
21
|
+
### Parameters
|
|
22
|
+
|
|
23
|
+
* `o` **any** 
|
|
24
|
+
|
|
25
|
+
Returns **[boolean][2]** 
|
|
26
|
+
|
|
27
|
+
## isDocument
|
|
28
|
+
|
|
29
|
+
[src/dom.js:50-53][3]
|
|
30
|
+
|
|
31
|
+
### Parameters
|
|
32
|
+
|
|
33
|
+
* `o` **any** 
|
|
34
|
+
|
|
35
|
+
Returns **[boolean][2]** 
|
|
36
|
+
|
|
37
|
+
## isDomElement
|
|
38
|
+
|
|
39
|
+
[src/dom.js:59-61][4]
|
|
40
|
+
|
|
41
|
+
### Parameters
|
|
42
|
+
|
|
43
|
+
* `o` **any** 
|
|
44
|
+
|
|
45
|
+
Returns **[boolean][2]** 
|
|
46
|
+
|
|
47
|
+
## getStyle
|
|
48
|
+
|
|
49
|
+
[src/dom.js:68-80][5]
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
* `el` **[Element][6]** 
|
|
54
|
+
* `cssRule` **[string][7]** 
|
|
55
|
+
|
|
56
|
+
Returns **[string][7]** 
|
|
57
|
+
|
|
58
|
+
## children
|
|
59
|
+
|
|
60
|
+
[src/dom.js:88-92][8]
|
|
61
|
+
|
|
62
|
+
### Parameters
|
|
63
|
+
|
|
64
|
+
* `el` **[Element][6]** 
|
|
65
|
+
* `selector` **[string][7]?** 
|
|
66
|
+
|
|
67
|
+
Returns **[NodeList][9]** 
|
|
68
|
+
|
|
69
|
+
## child
|
|
70
|
+
|
|
71
|
+
[src/dom.js:99-101][10]
|
|
72
|
+
|
|
73
|
+
### Parameters
|
|
74
|
+
|
|
75
|
+
* `el` **[Element][6]** 
|
|
76
|
+
* `selector` **[string][7]?** 
|
|
77
|
+
|
|
78
|
+
Returns **([Element][6] | null)** 
|
|
79
|
+
|
|
80
|
+
## findOne
|
|
81
|
+
|
|
82
|
+
[src/dom.js:108-110][11]
|
|
83
|
+
|
|
84
|
+
### Parameters
|
|
85
|
+
|
|
86
|
+
* `refEl` **([Element][6] | [Document][12] | [string][7])** 
|
|
87
|
+
* `selector` **([string][7] | [Element][6] | [NodeList][9] | [Array][13]<[Element][6]>)?** 
|
|
88
|
+
|
|
89
|
+
Returns **[Element][6]** 
|
|
90
|
+
|
|
91
|
+
## find
|
|
92
|
+
|
|
93
|
+
[src/dom.js:117-142][14]
|
|
94
|
+
|
|
95
|
+
### Parameters
|
|
96
|
+
|
|
97
|
+
* `refEl` **([Element][6] | [Document][12] | [string][7])** 
|
|
98
|
+
* `selector` **([string][7] | [Element][6] | [NodeList][9] | [Array][13]<[Element][6]>)?** 
|
|
99
|
+
|
|
100
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
101
|
+
|
|
102
|
+
## findOneByData
|
|
103
|
+
|
|
104
|
+
[src/dom.js:150-152][15]
|
|
105
|
+
|
|
106
|
+
### Parameters
|
|
107
|
+
|
|
108
|
+
* `el` **([Element][6] | [string][7])** 
|
|
109
|
+
* `data` **[string][7]** 
|
|
110
|
+
* `value` **[string][7]?** 
|
|
111
|
+
|
|
112
|
+
Returns **([Element][6] | null)** 
|
|
113
|
+
|
|
114
|
+
## findByData
|
|
115
|
+
|
|
116
|
+
[src/dom.js:160-163][16]
|
|
117
|
+
|
|
118
|
+
### Parameters
|
|
119
|
+
|
|
120
|
+
* `el` **([Element][6] | [string][7])** 
|
|
121
|
+
* `data` **[string][7]** 
|
|
122
|
+
* `value` **[string][7]?** 
|
|
123
|
+
|
|
124
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
125
|
+
|
|
126
|
+
## addClass
|
|
127
|
+
|
|
128
|
+
[src/dom.js:170-188][17]
|
|
129
|
+
|
|
130
|
+
### Parameters
|
|
131
|
+
|
|
132
|
+
* `el` **([Element][6] | [NodeList][9] | [Array][13]<[Element][6]>)** 
|
|
133
|
+
* `className` **[string][7]** 
|
|
134
|
+
|
|
135
|
+
Returns **([Element][6] | [NodeList][9] | [Array][13]<[Element][6]>)** 
|
|
136
|
+
|
|
137
|
+
## removeClass
|
|
138
|
+
|
|
139
|
+
[src/dom.js:195-213][18]
|
|
140
|
+
|
|
141
|
+
### Parameters
|
|
142
|
+
|
|
143
|
+
* `el` **([Element][6] | [NodeList][9] | [Array][13]<[Element][6]>)** 
|
|
144
|
+
* `className` **[string][7]** 
|
|
145
|
+
|
|
146
|
+
Returns **([Element][6] | [NodeList][9] | [Array][13]<[Element][6]>)** 
|
|
147
|
+
|
|
148
|
+
## toggleClass
|
|
149
|
+
|
|
150
|
+
[src/dom.js:221-230][19]
|
|
151
|
+
|
|
152
|
+
### Parameters
|
|
153
|
+
|
|
154
|
+
* `el` **[Element][6]** 
|
|
155
|
+
* `classNames` **[string][7]** 
|
|
156
|
+
* `force` **[boolean][2]?** 
|
|
157
|
+
|
|
158
|
+
Returns **[Element][6]** 
|
|
159
|
+
|
|
160
|
+
## hasClass
|
|
161
|
+
|
|
162
|
+
[src/dom.js:237-257][20]
|
|
163
|
+
|
|
164
|
+
### Parameters
|
|
165
|
+
|
|
166
|
+
* `el` **[Element][6]** 
|
|
167
|
+
* `classNames` **[string][7]** 
|
|
168
|
+
|
|
169
|
+
Returns **[boolean][2]** 
|
|
170
|
+
|
|
171
|
+
## append
|
|
172
|
+
|
|
173
|
+
[src/dom.js:264-274][21]
|
|
174
|
+
|
|
175
|
+
### Parameters
|
|
176
|
+
|
|
177
|
+
* `node` **[Node][22]** 
|
|
178
|
+
* `children` **...([Node][22] | [string][7])** 
|
|
179
|
+
|
|
180
|
+
Returns **[Node][22]** 
|
|
181
|
+
|
|
182
|
+
## prepend
|
|
183
|
+
|
|
184
|
+
[src/dom.js:281-291][23]
|
|
185
|
+
|
|
186
|
+
### Parameters
|
|
187
|
+
|
|
188
|
+
* `node` **[Node][22]** 
|
|
189
|
+
* `children` **...([Node][22] | [string][7])** 
|
|
190
|
+
|
|
191
|
+
Returns **[Node][22]** 
|
|
192
|
+
|
|
193
|
+
## remove
|
|
194
|
+
|
|
195
|
+
[src/dom.js:297-307][24]
|
|
196
|
+
|
|
197
|
+
### Parameters
|
|
198
|
+
|
|
199
|
+
* `els` **([Element][6] | [NodeList][9] | [Array][13]<[Element][6]> | [string][7])** 
|
|
200
|
+
|
|
201
|
+
Returns **void** 
|
|
202
|
+
|
|
203
|
+
## closest
|
|
204
|
+
|
|
205
|
+
[src/dom.js:314-338][25]
|
|
206
|
+
|
|
207
|
+
### Parameters
|
|
208
|
+
|
|
209
|
+
* `el` **[Element][6]** 
|
|
210
|
+
* `selector` **([string][7] | [Element][6])?** 
|
|
211
|
+
|
|
212
|
+
Returns **([Element][6] | null)** 
|
|
213
|
+
|
|
214
|
+
## next
|
|
215
|
+
|
|
216
|
+
[src/dom.js:345-355][26]
|
|
217
|
+
|
|
218
|
+
### Parameters
|
|
219
|
+
|
|
220
|
+
* `el` **[Element][6]** 
|
|
221
|
+
* `selector` **[string][7]?** (optional, default `null`)
|
|
222
|
+
|
|
223
|
+
Returns **([Element][6] | null)** 
|
|
224
|
+
|
|
225
|
+
## prev
|
|
226
|
+
|
|
227
|
+
[src/dom.js:362-372][27]
|
|
228
|
+
|
|
229
|
+
### Parameters
|
|
230
|
+
|
|
231
|
+
* `el` **[Element][6]** 
|
|
232
|
+
* `selector` **([string][7] | null)?** (optional, default `null`)
|
|
233
|
+
|
|
234
|
+
Returns **([Element][6] | null)** 
|
|
235
|
+
|
|
236
|
+
## nextAll
|
|
237
|
+
|
|
238
|
+
[src/dom.js:379-393][28]
|
|
239
|
+
|
|
240
|
+
### Parameters
|
|
241
|
+
|
|
242
|
+
* `el` **[Element][6]** 
|
|
243
|
+
* `selector` **[string][7]?** 
|
|
244
|
+
|
|
245
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
246
|
+
|
|
247
|
+
## prevAll
|
|
248
|
+
|
|
249
|
+
[src/dom.js:400-414][29]
|
|
250
|
+
|
|
251
|
+
### Parameters
|
|
252
|
+
|
|
253
|
+
* `el` **[Element][6]** 
|
|
254
|
+
* `selector` **[string][7]?** 
|
|
255
|
+
|
|
256
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
257
|
+
|
|
258
|
+
## nextUntil
|
|
259
|
+
|
|
260
|
+
[src/dom.js:421-444][30]
|
|
261
|
+
|
|
262
|
+
### Parameters
|
|
263
|
+
|
|
264
|
+
* `el` **[Element][6]** 
|
|
265
|
+
* `selector` **([Element][6] | [string][7])** 
|
|
266
|
+
|
|
267
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
268
|
+
|
|
269
|
+
## prevUntil
|
|
270
|
+
|
|
271
|
+
[src/dom.js:451-474][31]
|
|
272
|
+
|
|
273
|
+
### Parameters
|
|
274
|
+
|
|
275
|
+
* `el` **[Element][6]** 
|
|
276
|
+
* `selector` **([Element][6] | [string][7])** 
|
|
277
|
+
|
|
278
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
279
|
+
|
|
280
|
+
## wrap
|
|
281
|
+
|
|
282
|
+
[src/dom.js:481-489][32]
|
|
283
|
+
|
|
284
|
+
### Parameters
|
|
285
|
+
|
|
286
|
+
* `el` **[Element][6]** 
|
|
287
|
+
* `wrappingElement` **[Element][6]** 
|
|
288
|
+
|
|
289
|
+
Returns **[Element][6]** 
|
|
290
|
+
|
|
291
|
+
## attr
|
|
292
|
+
|
|
293
|
+
[src/dom.js:497-507][33]
|
|
294
|
+
|
|
295
|
+
### Parameters
|
|
296
|
+
|
|
297
|
+
* `el` **[Element][6]** 
|
|
298
|
+
* `name` **[string][7]** 
|
|
299
|
+
* `value` **any?** 
|
|
300
|
+
|
|
301
|
+
Returns **([Element][6] | any)** 
|
|
302
|
+
|
|
303
|
+
## prop
|
|
304
|
+
|
|
305
|
+
[src/dom.js:515-522][34]
|
|
306
|
+
|
|
307
|
+
### Parameters
|
|
308
|
+
|
|
309
|
+
* `el` **[Element][6]** 
|
|
310
|
+
* `name` **[string][7]** 
|
|
311
|
+
* `value` **any?** 
|
|
312
|
+
|
|
313
|
+
Returns **(any | [Element][6])** 
|
|
314
|
+
|
|
315
|
+
## html
|
|
316
|
+
|
|
317
|
+
[src/dom.js:529-534][35]
|
|
318
|
+
|
|
319
|
+
### Parameters
|
|
320
|
+
|
|
321
|
+
* `el` **[Element][6]** 
|
|
322
|
+
* `html` **[string][7]?** 
|
|
323
|
+
|
|
324
|
+
Returns **([Element][6] | any)** 
|
|
325
|
+
|
|
326
|
+
## text
|
|
327
|
+
|
|
328
|
+
[src/dom.js:541-546][36]
|
|
329
|
+
|
|
330
|
+
### Parameters
|
|
331
|
+
|
|
332
|
+
* `el` **[Element][6]** 
|
|
333
|
+
* `text` **[string][7]?** 
|
|
334
|
+
|
|
335
|
+
Returns **([Element][6] | any)** 
|
|
336
|
+
|
|
337
|
+
## hide
|
|
338
|
+
|
|
339
|
+
[src/dom.js:552-560][37]
|
|
340
|
+
|
|
341
|
+
### Parameters
|
|
342
|
+
|
|
343
|
+
* `el` **[Element][6]** 
|
|
344
|
+
|
|
345
|
+
Returns **[Element][6]** 
|
|
346
|
+
|
|
347
|
+
## show
|
|
348
|
+
|
|
349
|
+
[src/dom.js:566-577][38]
|
|
350
|
+
|
|
351
|
+
### Parameters
|
|
352
|
+
|
|
353
|
+
* `el` **[Element][6]** 
|
|
354
|
+
|
|
355
|
+
Returns **[Element][6]** 
|
|
356
|
+
|
|
357
|
+
## toggle
|
|
358
|
+
|
|
359
|
+
[src/dom.js:583-585][39]
|
|
360
|
+
|
|
361
|
+
### Parameters
|
|
362
|
+
|
|
363
|
+
* `el` **[Element][6]** 
|
|
364
|
+
|
|
365
|
+
Returns **[Element][6]** 
|
|
366
|
+
|
|
367
|
+
## data
|
|
368
|
+
|
|
369
|
+
[src/dom.js:593-616][40]
|
|
370
|
+
|
|
371
|
+
### Parameters
|
|
372
|
+
|
|
373
|
+
* `el` **[Element][6]** 
|
|
374
|
+
* `name` **([Object][41]<[string][7], [string][7]> | [string][7])** 
|
|
375
|
+
* `value` **[string][7]?** 
|
|
376
|
+
|
|
377
|
+
Returns **([Element][6] | DOMStringMap)** 
|
|
378
|
+
|
|
379
|
+
## removeData
|
|
380
|
+
|
|
381
|
+
[src/dom.js:623-629][42]
|
|
382
|
+
|
|
383
|
+
### Parameters
|
|
384
|
+
|
|
385
|
+
* `el` **[Element][6]** 
|
|
386
|
+
* `name` **[string][7]** 
|
|
387
|
+
|
|
388
|
+
Returns **([Element][6] | any)** 
|
|
389
|
+
|
|
390
|
+
## css
|
|
391
|
+
|
|
392
|
+
[src/dom.js:637-660][43]
|
|
393
|
+
|
|
394
|
+
### Parameters
|
|
395
|
+
|
|
396
|
+
* `el` **[HTMLElement][44]** 
|
|
397
|
+
* `style` **([Object][41]<[string][7], [string][7]> | [string][7])** 
|
|
398
|
+
* `value` **[string][7]?** 
|
|
399
|
+
|
|
400
|
+
Returns **[Element][6]** 
|
|
401
|
+
|
|
402
|
+
## closestFind
|
|
403
|
+
|
|
404
|
+
[src/dom.js:668-676][45]
|
|
405
|
+
|
|
406
|
+
### Parameters
|
|
407
|
+
|
|
408
|
+
* `el` **[Element][6]** 
|
|
409
|
+
* `selectorClosest` **[string][7]** 
|
|
410
|
+
* `selectorFind` **[string][7]** 
|
|
411
|
+
|
|
412
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
413
|
+
|
|
414
|
+
## closestFindOne
|
|
415
|
+
|
|
416
|
+
[src/dom.js:684-692][46]
|
|
417
|
+
|
|
418
|
+
### Parameters
|
|
419
|
+
|
|
420
|
+
* `el` **[Element][6]** 
|
|
421
|
+
* `selectorClosest` **[string][7]** 
|
|
422
|
+
* `selectorFindOne` **[string][7]** 
|
|
423
|
+
|
|
424
|
+
Returns **([Element][6] | null)** 
|
|
425
|
+
|
|
426
|
+
## first
|
|
427
|
+
|
|
428
|
+
[src/dom.js:698-701][47]
|
|
429
|
+
|
|
430
|
+
### Parameters
|
|
431
|
+
|
|
432
|
+
* `nodeList` **([NodeList][9] | [Element][6] | [Array][13]<[Element][6]>)** 
|
|
433
|
+
|
|
434
|
+
Returns **([Element][6] | null)** 
|
|
435
|
+
|
|
436
|
+
## last
|
|
437
|
+
|
|
438
|
+
[src/dom.js:707-711][48]
|
|
439
|
+
|
|
440
|
+
### Parameters
|
|
441
|
+
|
|
442
|
+
* `nodeList` **([NodeList][9] | [Array][13]<[Element][6]>)** 
|
|
443
|
+
|
|
444
|
+
Returns **([Element][6] | null)** 
|
|
445
|
+
|
|
446
|
+
## create
|
|
447
|
+
|
|
448
|
+
[src/dom.js:717-738][49]
|
|
449
|
+
|
|
450
|
+
### Parameters
|
|
451
|
+
|
|
452
|
+
* `html` **[string][7]** 
|
|
453
|
+
|
|
454
|
+
Returns **([Element][6] | [DocumentFragment][50] | null)** 
|
|
455
|
+
|
|
456
|
+
## eq
|
|
457
|
+
|
|
458
|
+
[src/dom.js:745-755][51]
|
|
459
|
+
|
|
460
|
+
### Parameters
|
|
461
|
+
|
|
462
|
+
* `nodeList` **([NodeList][9] | [Array][13]<[Element][6]>)** 
|
|
463
|
+
* `index` **[number][52]** (optional, default `0`)
|
|
464
|
+
|
|
465
|
+
Returns **([Element][6] | null)** 
|
|
466
|
+
|
|
467
|
+
## after
|
|
468
|
+
|
|
469
|
+
[src/dom.js:762-770][53]
|
|
470
|
+
|
|
471
|
+
### Parameters
|
|
472
|
+
|
|
473
|
+
* `el` **[Element][6]** 
|
|
474
|
+
* `newEl` **([Element][6] | [string][7])** 
|
|
475
|
+
|
|
476
|
+
Returns **([Element][6] | null)** 
|
|
477
|
+
|
|
478
|
+
## before
|
|
479
|
+
|
|
480
|
+
[src/dom.js:777-785][54]
|
|
481
|
+
|
|
482
|
+
### Parameters
|
|
483
|
+
|
|
484
|
+
* `el` **[Element][6]** 
|
|
485
|
+
* `newEl` **([Element][6] | [string][7])** 
|
|
486
|
+
|
|
487
|
+
Returns **([Element][6] | null)** 
|
|
488
|
+
|
|
489
|
+
## empty
|
|
490
|
+
|
|
491
|
+
[src/dom.js:791-801][55]
|
|
492
|
+
|
|
493
|
+
### Parameters
|
|
494
|
+
|
|
495
|
+
* `el` **([Element][6] | [string][7])** 
|
|
496
|
+
|
|
497
|
+
Returns **[Element][6]** 
|
|
498
|
+
|
|
499
|
+
## not
|
|
500
|
+
|
|
501
|
+
[src/dom.js:808-822][56]
|
|
502
|
+
|
|
503
|
+
### Parameters
|
|
504
|
+
|
|
505
|
+
* `el` **([Element][6] | [NodeList][9] | [Array][13]<[Element][6]>)** 
|
|
506
|
+
* `selector` **([string][7] | [Element][6])** 
|
|
507
|
+
|
|
508
|
+
Returns **[Array][13]<[Element][6]>** 
|
|
509
|
+
|
|
510
|
+
## collide
|
|
511
|
+
|
|
512
|
+
[src/dom.js:829-840][57]
|
|
513
|
+
|
|
514
|
+
### Parameters
|
|
515
|
+
|
|
516
|
+
* `elem1` **[Element][6]** 
|
|
517
|
+
* `elem2` **[Element][6]** 
|
|
518
|
+
|
|
519
|
+
Returns **[boolean][2]** 
|
|
520
|
+
|
|
521
|
+
## matches
|
|
522
|
+
|
|
523
|
+
[src/dom.js:846-852][58]
|
|
524
|
+
|
|
525
|
+
### Parameters
|
|
526
|
+
|
|
527
|
+
* `el` **[Element][6]** 
|
|
528
|
+
* `selector` **([string][7] | [Element][6])** 
|
|
529
|
+
|
|
530
|
+
## replaceChild
|
|
531
|
+
|
|
532
|
+
[src/dom.js:859-861][59]
|
|
533
|
+
|
|
534
|
+
### Parameters
|
|
535
|
+
|
|
536
|
+
* `el` **[Element][6]** 
|
|
537
|
+
* `child` **[Element][6]** 
|
|
538
|
+
* `oldChild` **[Element][6]** 
|
|
539
|
+
|
|
540
|
+
## replaceChildren
|
|
541
|
+
|
|
542
|
+
[src/dom.js:868-881][60]
|
|
543
|
+
|
|
544
|
+
### Parameters
|
|
545
|
+
|
|
546
|
+
* `el` **[Element][6]** 
|
|
547
|
+
* `children` **([NodeList][9] | [Array][13]<[Element][6]> | [Array][13]<[string][7]>)** 
|
|
548
|
+
|
|
549
|
+
Returns **[Element][6]** 
|
|
550
|
+
|
|
551
|
+
## offset
|
|
552
|
+
|
|
553
|
+
[src/dom.js:887-909][61]
|
|
554
|
+
|
|
555
|
+
### Parameters
|
|
556
|
+
|
|
557
|
+
* `el` **([Element][6] | [Document][12] | [Window][62])** 
|
|
558
|
+
|
|
559
|
+
Returns **{top: [number][52], left: [number][52]}** 
|
|
560
|
+
|
|
561
|
+
[1]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L42-L44 "Source code on GitHub"
|
|
562
|
+
|
|
563
|
+
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
564
|
+
|
|
565
|
+
[3]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L50-L53 "Source code on GitHub"
|
|
566
|
+
|
|
567
|
+
[4]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L59-L61 "Source code on GitHub"
|
|
568
|
+
|
|
569
|
+
[5]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L68-L80 "Source code on GitHub"
|
|
570
|
+
|
|
571
|
+
[6]: https://developer.mozilla.org/docs/Web/API/Element
|
|
572
|
+
|
|
573
|
+
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
574
|
+
|
|
575
|
+
[8]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L88-L92 "Source code on GitHub"
|
|
576
|
+
|
|
577
|
+
[9]: https://developer.mozilla.org/docs/Web/API/NodeList
|
|
578
|
+
|
|
579
|
+
[10]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L99-L101 "Source code on GitHub"
|
|
580
|
+
|
|
581
|
+
[11]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L108-L110 "Source code on GitHub"
|
|
582
|
+
|
|
583
|
+
[12]: https://developer.mozilla.org/docs/Web/API/Document
|
|
584
|
+
|
|
585
|
+
[13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
586
|
+
|
|
587
|
+
[14]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L117-L142 "Source code on GitHub"
|
|
588
|
+
|
|
589
|
+
[15]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L150-L152 "Source code on GitHub"
|
|
590
|
+
|
|
591
|
+
[16]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L160-L163 "Source code on GitHub"
|
|
592
|
+
|
|
593
|
+
[17]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L170-L188 "Source code on GitHub"
|
|
594
|
+
|
|
595
|
+
[18]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L195-L213 "Source code on GitHub"
|
|
596
|
+
|
|
597
|
+
[19]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L221-L230 "Source code on GitHub"
|
|
598
|
+
|
|
599
|
+
[20]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L237-L257 "Source code on GitHub"
|
|
600
|
+
|
|
601
|
+
[21]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L264-L274 "Source code on GitHub"
|
|
602
|
+
|
|
603
|
+
[22]: https://developer.mozilla.org/docs/Web/API/Node/nextSibling
|
|
604
|
+
|
|
605
|
+
[23]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L281-L291 "Source code on GitHub"
|
|
606
|
+
|
|
607
|
+
[24]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L297-L307 "Source code on GitHub"
|
|
608
|
+
|
|
609
|
+
[25]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L314-L338 "Source code on GitHub"
|
|
610
|
+
|
|
611
|
+
[26]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L345-L355 "Source code on GitHub"
|
|
612
|
+
|
|
613
|
+
[27]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L362-L372 "Source code on GitHub"
|
|
614
|
+
|
|
615
|
+
[28]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L379-L393 "Source code on GitHub"
|
|
616
|
+
|
|
617
|
+
[29]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L400-L414 "Source code on GitHub"
|
|
618
|
+
|
|
619
|
+
[30]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L421-L444 "Source code on GitHub"
|
|
620
|
+
|
|
621
|
+
[31]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L451-L474 "Source code on GitHub"
|
|
622
|
+
|
|
623
|
+
[32]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L481-L489 "Source code on GitHub"
|
|
624
|
+
|
|
625
|
+
[33]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L497-L507 "Source code on GitHub"
|
|
626
|
+
|
|
627
|
+
[34]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L515-L522 "Source code on GitHub"
|
|
628
|
+
|
|
629
|
+
[35]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L529-L534 "Source code on GitHub"
|
|
630
|
+
|
|
631
|
+
[36]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L541-L546 "Source code on GitHub"
|
|
632
|
+
|
|
633
|
+
[37]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L552-L560 "Source code on GitHub"
|
|
634
|
+
|
|
635
|
+
[38]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L566-L577 "Source code on GitHub"
|
|
636
|
+
|
|
637
|
+
[39]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L583-L585 "Source code on GitHub"
|
|
638
|
+
|
|
639
|
+
[40]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L593-L616 "Source code on GitHub"
|
|
640
|
+
|
|
641
|
+
[41]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
642
|
+
|
|
643
|
+
[42]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L623-L629 "Source code on GitHub"
|
|
644
|
+
|
|
645
|
+
[43]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L637-L660 "Source code on GitHub"
|
|
646
|
+
|
|
647
|
+
[44]: https://developer.mozilla.org/docs/Web/HTML/Element
|
|
648
|
+
|
|
649
|
+
[45]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L668-L676 "Source code on GitHub"
|
|
650
|
+
|
|
651
|
+
[46]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L684-L692 "Source code on GitHub"
|
|
652
|
+
|
|
653
|
+
[47]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L698-L701 "Source code on GitHub"
|
|
654
|
+
|
|
655
|
+
[48]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L707-L711 "Source code on GitHub"
|
|
656
|
+
|
|
657
|
+
[49]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L717-L738 "Source code on GitHub"
|
|
658
|
+
|
|
659
|
+
[50]: https://developer.mozilla.org/docs/Web/API/DocumentFragment
|
|
660
|
+
|
|
661
|
+
[51]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L745-L755 "Source code on GitHub"
|
|
662
|
+
|
|
663
|
+
[52]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
664
|
+
|
|
665
|
+
[53]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L762-L770 "Source code on GitHub"
|
|
666
|
+
|
|
667
|
+
[54]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L777-L785 "Source code on GitHub"
|
|
668
|
+
|
|
669
|
+
[55]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L791-L801 "Source code on GitHub"
|
|
670
|
+
|
|
671
|
+
[56]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L808-L822 "Source code on GitHub"
|
|
672
|
+
|
|
673
|
+
[57]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L829-L840 "Source code on GitHub"
|
|
674
|
+
|
|
675
|
+
[58]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L846-L852 "Source code on GitHub"
|
|
676
|
+
|
|
677
|
+
[59]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L859-L861 "Source code on GitHub"
|
|
678
|
+
|
|
679
|
+
[60]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L868-L881 "Source code on GitHub"
|
|
680
|
+
|
|
681
|
+
[61]: https://github.com/webalternatif/js-core/blob/c9158e27ed191c37c696ced37950f978a21eecba/src/dom.js#L887-L909 "Source code on GitHub"
|
|
682
|
+
|
|
683
|
+
[62]: https://developer.mozilla.org/docs/Web/API/Window
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Event Dispatcher
|
|
2
|
+
|
|
3
|
+
Description of the event dispatcher.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import { eventDispatcher } from '@webalternatif/js-core'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
<!-- GENERATED:eventDispatcher -->
|
|
15
|
+
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
package/docs/is.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Type Checking
|
|
2
|
+
|
|
3
|
+
Description of the type checking.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import { is } from '@webalternatif/js-core'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
<!-- GENERATED:is -->
|
|
15
|
+
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|