-
Notifications
You must be signed in to change notification settings - Fork 0
/
Document.cljs
4334 lines (2921 loc) · 128 KB
/
Document.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(ns web.Document
"The Document interface represents any web page loaded in the
and serves as an entry point into the web page's content, which
the DOM tree."
(:refer-clojure :exclude [drop]))
(def constructor
"Constructor.
The Document constructor creates a new `web.Document` object that is a web page loaded in the browser and serving as an entry point into the page's content.
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/Document`"
js/Document)
(defn adopt-node
"Method.
Document.adoptNode() transfers a node from another document into
method's document. The adopted node and its subtree is removed
its original document (if any), and its `ownerDocument` is changed
the current document. The node can then be inserted into the
document.
`node = document.adoptNode(externalNode);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/adoptNode`"
[this external-node]
(-> this (.adoptNode external-node)))
(defn capture-events
"Method.
See Window.captureEvents."
[this & args]
(-> this .-captureEvents (.apply this (clj->js args))))
(defn caret-range-from-point
"Method.
The caretRangeFromPoint() method of the `web.Document` interface
a `web.Range` object for the document fragment under the specified
`var range = document.caretRangeFromPoint(float x, float y);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint`"
[this & args]
(-> this .-caretRangeFromPoint (.apply this (clj->js args))))
(defn create-attribute
"Method.
The Document.createAttribute() method creates a new attribute
and returns it. The object created a node implementing the `web.Attr`
The DOM does not enforce what sort of attributes can be added
a particular element in this manner.
`attribute = document.createAttribute(name)`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createAttribute`"
[this name]
(-> this (.createAttribute name)))
(defn create-attribute-ns
"Method.
Creates a new attribute node in a given namespace and returns"
[this & args]
(-> this .-createAttributeNS (.apply this (clj->js args))))
(defn create-cdata-section
"Method.
createCDATASection() creates a new CDATA section node, and returns
`var CDATASectionNode = document.createCDATASection(data);
CDATASectionNode is a CDATA Section node.
data is a string containing the data to be added to the CDATA Section.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection`"
[this & args]
(-> this .-createCDATASection (.apply this (clj->js args))))
(defn create-comment
"Method.
createComment() creates a new comment node, and returns it.
`CommentNode = document.createComment(data);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createComment`"
[this data]
(-> this (.createComment data)))
(defn create-document-fragment
"Method.
Creates a new empty `web.web-components.DocumentFragment`.
`var fragment = document.createDocumentFragment();
fragment is a reference to an empty `web.web-components.DocumentFragment` object.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createDocumentFragment`"
[this & args]
(-> this .-createDocumentFragment (.apply this (clj->js args))))
(defn create-element
"Method.
In an HTML document, the document.createElement() method creates
HTML element specified by tagName, or an `web.dom.HTMLUnknownElement`
tagName isn't recognized.
`var element = document.createElement(tagName[, options]);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement`"
[this & args]
(-> this .-createElement (.apply this (clj->js args))))
(defn create-element-ns
"Method.
Creates an element with the specified namespace URI and qualified
`var element = document.createElementNS(namespaceURI, qualifiedName[, options]);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS`"
[this & args]
(-> this .-createElementNS (.apply this (clj->js args))))
(defn create-entity-reference
"Method.
Prior to Gecko 7.0 this method showed up as present, due to bug
9850, it always only returned null. The only workaround is to
a text node, CDATA section, attribute node value, etc. which
the value referred to by the entity, using Unicode escape sequences
fromCharCode() as necessary.
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createEntityReference`"
[this & args]
(-> this .-createEntityReference (.apply this (clj->js args))))
(defn create-event
"Method.
Creates an event of the type specified. The returned object should
first initialized and can then be passed to `EventTarget.dispatchEvent`.
`var event = document.createEvent(type);
event is the created Event object.
type is a string that represents the type of event to be created. Possible event types include \\\"UIEvents\\\", \\\"MouseEvents\\\", \\\"MutationEvents\\\", and \\\"HTMLEvents\\\". See Notes section for details.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createEvent`"
[this & args]
(-> this .-createEvent (.apply this (clj->js args))))
(defn create-node-iterator
"Method.
Returns a new NodeIterator object.
`var nodeIterator = document.createNodeIterator(root, whatToShow, filter);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createNodeIterator`"
[this root what-to-show filter]
(-> this (.createNodeIterator root what-to-show filter)))
(defn create-processing-instruction
"Method.
createProcessingInstruction() generates a new processing instruction
and returns it.
`piNode = document.createProcessingInstruction(target, data)`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createProcessingInstruction`"
[this target data]
(-> this (.createProcessingInstruction target data)))
(defn create-range
"Method.
The Document.createRange() method returns a new `web.Range` object.
`range = document.createRange();
range is the created `web.Range` object.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createRange`"
[this & args]
(-> this .-createRange (.apply this (clj->js args))))
(defn create-text-node
"Method.
Creates a new `web.Text` node. This method can be used to escape
characters.
`var text = document.createTextNode(data);
text is a `web.Text` node.
data is a string containing the data to be put in the text node.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createTextNode`"
[this & args]
(-> this .-createTextNode (.apply this (clj->js args))))
(defn create-touch
"Method.
The Document.createTouch() method creates and returns a new `web.other.Touch`
`var touch = DocumentTouch.createTouch(view, target, identifier, pageX, pageY,
screenX, screenY);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createTouch`"
[this & args]
(-> this .-createTouch (.apply this (clj->js args))))
(defn create-touch-list
"Method.
The Document.createTouchList() method creates and returns a new
object.
`var list = DocumentTouch.createTouchList([touch1 [, touch2 [, ...]]]);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createTouchList`"
[this & args]
(-> this .-createTouchList (.apply this (clj->js args))))
(defn create-tree-walker
"Method.
The Document.createTreeWalker() creator method returns a newly
`web.TreeWalker` object.
`document.createTreeWalker(root, whatToShow[, filter[, entityReferenceExpansion]]);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createTreeWalker`"
[this & args]
(-> this .-createTreeWalker (.apply this (clj->js args))))
(defn enable-style-sheets-for-set
"Method.
Enables the style sheets matching the specified name in the current
sheet set, and disables all other style sheets (except those
a title, which are always enabled).
`document.enableStyleSheetsForSet(name);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/enableStyleSheetsForSet`"
[this name]
(-> this (.enableStyleSheetsForSet name)))
(defn exit-pointer-lock
"Method.
The exitPointerLock() method asynchronously releases a pointer
previously requested through `Element.requestPointerLock`.
`document.exitPointerLock();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/exitPointerLock`"
[this ]
(-> this (.exitPointerLock)))
(defn get-animations
"Method.
The getAnimations() method of the `web.Document` interface returns
array of all `web.animation.Animation` objects currently in effect
target elements are descendants of the document. This array includes
Animations, CSS Transitions, and Web Animations.
`var allAnimations = Document.getAnimations();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/getAnimations`"
[this ]
(-> this (.getAnimations)))
(defn get-elements-by-class-name
"Method.
returns an array-like object of all child elements which have
of the given class names.
`var elements = document.getElementsByClassName(names); // or:
var elements = rootElement.getElementsByClassName(names);
elements is a live `web.dom.HTMLCollection` of found elements.
names is a string representing the list of class names to match; class names are separated by whitespace
`getElementsByClassName` can be called on any element, not only on the `document`. The element on which it is called will be used as the root of the search.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName`"
[this & args]
(-> this .-getElementsByClassName (.apply this (clj->js args))))
(defn get-elements-by-tag-name
"Method.
returns an `web.dom.HTMLCollection` of elements with the given
name.
`var elements = document.getElementsByTagName(name);
elements is a live `web.dom.HTMLCollection` (but see the note below) of found elements in the order they appear in the tree.
name is a string representing the name of the elements. The special string \\\"*\\\" represents all elements.
The latest W3C specification says elements is an HTMLCollection; however, this method returns a `web.NodeList` in WebKit browsers. See bug 14869 for details.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByTagName`"
[this & args]
(-> this .-getElementsByTagName (.apply this (clj->js args))))
(defn get-elements-by-tag-name-ns
"Method.
Returns a list of elements with the given tag name belonging
the given namespace. The complete document is searched, including
root node.
`elements = document.getElementsByTagNameNS(namespace, name)
elements is a live `web.NodeList` (but see the note below) of found elements in the order they appear in the tree.
namespace is the namespace URI of elements to look for (see `element.namespaceURI`).
name is either the local name of elements to look for or the special value *, which matches all elements (see `element.localName`).
Note: While the W3C specification says elements is a NodeList, this method returns a `web.dom.HTMLCollection` both in Gecko and Internet Explorer. Opera returns a NodeList, but with a namedItem method implemented, which makes it similar to a HTMLCollection. As of January 2012, only in WebKit browsers is the returned value a pure NodeList. See bug 14869 for details.
Note: Currently parameters in this method are case-sensitive, but they were case-insensitive in Firefox 3.5 and before. See the developer release note for Firefox 3.6 and a note in Browser compatibility section in `Element.getElementsByTagNameNS` for details.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByTagNameNS`"
[this & args]
(-> this .-getElementsByTagNameNS (.apply this (clj->js args))))
(defn has-storage-access
"Method.
The hasStorageAccess() method of the `web.Document` interface
a `js.Promise` that resolves with a boolean value indicating
the document has access to its first-party storage.
`Promise<boolean> hasStorageAccess()`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/hasStorageAccess`"
[this ]
(-> this (.hasStorageAccess)))
(defn import-node
"Method.
The `web.Document` object's importNode() method creates a copy
a `web.Node` or `web.web-components.DocumentFragment` from another
to be inserted into the current document later.
`var node = document.importNode(externalNode, deep);
node
The copied node in the scope of the importing document. The new node's `Node.parentNode` is null, since it has not yet been inserted into the document tree.
externalNode
The external Node or DocumentFragment to import into the current document.
deep
A Boolean which controls whether or not to import the entire DOM subtree of the externalNode.
If deep is set to true, then externalNode and all of its descendants are copied.
If deep is set to false, then only externalNode is imported — the new node has no children.
Note: In the DOM4 specification, deep was an optional argument with a default value of true.
This default has changed in the latest spec — the new default value is false. Though it's still an optional argument, you should always provide the deep argument for backward and forward compatibility. With Gecko 28.0 (Firefox 28 / Thunderbird 28 / SeaMonkey 2.25 / Firefox OS 1.3), the console warns developers not to omit the argument. Starting with Gecko 29.0 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)), a shallow clone is defaulted instead of a deep clone.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/importNode`"
[this & args]
(-> this .-importNode (.apply this (clj->js args))))
(defn normalize-document
"Method.
Replaces entities, normalizes text nodes, etc."
[this & args]
(-> this .-normalizeDocument (.apply this (clj->js args))))
(defn release-capture
"Method.
The releaseCapture() method releases mouse capture if it's currently
on an element within this document. Enabling mouse capture on
element is done by calling `element.setCapture()`.
`document.releaseCapture();
Once mouse capture is released, mouse events will no longer all be directed to the element on which capture is enabled.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/releaseCapture`"
[this & args]
(-> this .-releaseCapture (.apply this (clj->js args))))
(defn release-events
"Method.
See Window.releaseEvents()."
[this & args]
(-> this .-releaseEvents (.apply this (clj->js args))))
(defn request-storage-access
"Method.
The requestStorageAccess() method of the `web.Document` interface
a `js.Promise` that resolves if the access to first-party storage
granted, and rejects if access was denied.
`Promise<void> requestStorageAccess()`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/requestStorageAccess`"
[this ]
(-> this (.requestStorageAccess)))
(defn route-event
"Method.
See Window.routeEvent()."
[this & args]
(-> this .-routeEvent (.apply this (clj->js args))))
(defn moz-set-image-element
"Method.
The Document.mozSetImageElement() method changes the element
used as the CSS background for a background with a given background
ID.
`document.mozSetImageElement(imageElementId, imageElement);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/mozSetImageElement`"
[this image-element-id image-element]
(-> this (.mozSetImageElement image-element-id image-element)))
(defn get-element-by-id
"Method.
The `web.Document` method getElementById() returns an `web.Element`
representing the element whose `id` property matches the specified
Since element IDs are required to be unique if specified, they're
useful way to get access to a specific element quickly.
`var element = document.getElementById(id);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById`"
[this id]
(-> this (.getElementById id)))
(defn query-selector
"Method.
The `web.Document` method querySelector() returns the first `web.Element`
the document that matches the specified selector, or group of
If no matches are found, null is returned.
`element = document.querySelector(selectors);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector`"
[this selectors]
(-> this (.querySelector selectors)))
(defn query-selector-all
"Method.
The `web.Document` method querySelectorAll() returns a static
live) `web.NodeList` representing a list of the document's elements
match the specified group of selectors.
`elementList = parentNode.querySelectorAll(selectors);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll`"
[this selectors]
(-> this (.querySelectorAll selectors)))
(defn create-expression
"Method.
This method compiles an `web.xpath.XPathExpression` which can
be used for (repeated) evaluations.
`xpathExpr = document.createExpression(xpathText, namespaceURLMapper);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createExpression`"
[this xpath-text namespace-url-mapper]
(-> this (.createExpression xpath-text namespace-url-mapper)))
(defn create-ns-resolver
"Method.
Creates an XPathNSResolver which resolves namespaces with respect
the definitions in scope for a specified node.
`nsResolver = document.createNSResolver(node);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/createNSResolver`"
[this node]
(-> this (.createNSResolver node)))
(defn evaluate
"Method.
Returns an `web.xpath.XPathResult` based on an XPath expression
other given parameters.
`var xpathResult = document.evaluate(
xpathExpression,
contextNode,
namespaceResolver,
resultType,
result
);
\\txpathExpression is a string representing the XPath to be evaluated.
\\tcontextNode specifies the context node for the query (see the XPath specification). It's common to pass document as the context node.
\\tnamespaceResolver is a function that will be passed any namespace prefixes and should return a string representing the namespace URI associated with that prefix. It will be used to resolve prefixes within the XPath itself, so that they can be matched with the document. null is common for HTML documents or when no namespace prefixes are used.
\\tresultType is an integer that corresponds to the type of result XPathResult to return. Use named constant properties, such as XPathResult.ANY_TYPE, of the XPathResult constructor, which correspond to integers from 0 to 9.
\\tresult is an existing XPathResult to use for the results. null is the most common and will create a new XPathResult`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/evaluate`"
[this & args]
(-> this .-evaluate (.apply this (clj->js args))))
(defn clear
"Method.
The Document.clear() method clears the whole specified document
early (pre-1.0) versions of Mozilla.
`document.clear();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/clear`"
[this ]
(-> this (.clear)))
(defn close
"Method.
The Document.close() method finishes writing to a document, opened
`Document.open()`.
`document.close();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/close`"
[this ]
(-> this (.close)))
(defn exec-command
"Method.
When an HTML document has been switched to designMode, its document
exposes an execCommand method to run commands that manipulate
current editable region, such as form inputs or contentEditable
`document.execCommand(aCommandName, aShowDefaultUI, aValueArgument)`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand`"
[this a-command-name a-show-default-ui a-value-argument]
(-> this (.execCommand a-command-name a-show-default-ui a-value-argument)))
(defn get-elements-by-name
"Method.
The getElementsByName() method of the `web.Document` object returns
`web.NodeList` Collection of elements with a given `name` in
document.
`var elements = document.getElementsByName(name);
elements is a live `web.NodeList` Collection, meaning it automatically updates as new elements with the same name are added to/removed from the document.
name is the value of the name attribute of the element(s).`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByName`"
[this & args]
(-> this .-getElementsByName (.apply this (clj->js args))))
(defn has-focus
"Method.
The hasFocus() method of the `web.Document` interface returns
`js.Boolean` value indicating whether the document or any element
the document has focus. This method can be used to determine
the active element in a document has focus.
`var focused = document.hasFocus();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/hasFocus`"
[this ]
(-> this (.hasFocus)))
(defn open
"Method.
The Document.open() method opens a document for writing.
`document.open();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/open`"
[this ]
(-> this (.open)))
(defn query-command-enabled
"Method.
The Document.queryCommandEnabled() method reports whether or
the specified editor command is enabled by the browser.
`isEnabled = document.queryCommandEnabled(command);
Parameters
command
The command for which to determine support.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/queryCommandEnabled`"
[this & args]
(-> this .-queryCommandEnabled (.apply this (clj->js args))))
(defn query-command-indeterm
"Method.
Returns true if the formating command is in an indeterminate
on the current range."
[this & args]
(-> this .-queryCommandIndeterm (.apply this (clj->js args))))
(defn query-command-state
"Method.
The queryCommandState method will tell you if the current selection
a certain `Document.execCommand()` command applied.
`queryCommandState(String command)
command is a command from `Document.execCommand()``
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/queryCommandState`"
[this & args]
(-> this .-queryCommandState (.apply this (clj->js args))))
(defn query-command-supported
"Method.
The Document.queryCommandSupported() method reports whether or
the specified editor command is supported by the browser.
`isSupported = document.queryCommandSupported(command);
Parameters
command
The command for which to determine support.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/queryCommandSupported`"
[this & args]
(-> this .-queryCommandSupported (.apply this (clj->js args))))
(defn query-command-value
"Method.
Returns the current value of the current range for a formating"
[this & args]
(-> this .-queryCommandValue (.apply this (clj->js args))))
(defn write
"Method.
The Document.write() method writes a string of text to a document
opened by `document.open()`.
`document.write(markup);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/write`"
[this markup]
(-> this (.write markup)))
(defn writeln
"Method.
Writes a string of text followed by a newline character to a
`document.writeln(line);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/writeln`"
[this line]
(-> this (.writeln line)))
(defn get-selection
"Method.
The getSelection() property of the `web.shadow-dom.DocumentOrShadowRoot`
returns a `web.other.Selection` object representing the range
text selected by the user, or the current position of the caret.
`var selection = documentOrShadowRootInstance.getSelection()`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/getSelection`"
[this ]
(-> this (.getSelection)))
(defn element-from-point
"Method.
The elementFromPoint() method—available on both the `web.Document`
`web.shadow-dom.ShadowRoot` objects—returns the topmost `web.Element`
the specified coordinates (relative to the viewport).
`var element = document.elementFromPoint(x, y);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementFromPoint`"
[this x y]
(-> this (.elementFromPoint x y)))
(defn elements-from-point
"Method.
The elementsFromPoint() property of the `web.shadow-dom.DocumentOrShadowRoot`
returns an array of all elements at the specified coordinates
to the viewport).
`var elements = document.elementsFromPoint(x, y);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementsFromPoint`"
[this x y]
(-> this (.elementsFromPoint x y)))
(defn caret-position-from-point
"Method.
The caretPositionFromPoint() property of the `web.shadow-dom.DocumentOrShadowRoot`
returns a `web.cssdom.CaretPosition` object, containing the DOM
along with the caret and caret's character offset within that
`var caretPosition = document.caretPositionFromPoint(float x, float y);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/caretPositionFromPoint`"
[this & args]
(-> this .-caretPositionFromPoint (.apply this (clj->js args))))
(defn append
"Method.
The ParentNode.append() method inserts a set of `web.Node` objects
`web.dom.DOMString` objects after the last child of the ParentNode.
objects are inserted as equivalent `web.Text` nodes.
`[Throws, Unscopable]
void ParentNode.append((Node or DOMString)... nodes);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append`"
[this & args]
(-> this .-append (.apply this (clj->js args))))
(defn exit-fullscreen
"Method.
The `web.Document` method exitFullscreen() requests that the
on this document which is currently being presented in full-screen
be taken out of full-screen mode, restoring the previous state
the screen.
`exitPromise = document.exitFullscreen();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/exitFullscreen`"
[this ]
(-> this (.exitFullscreen)))
(defn get-box-object-for
"Method.
Returns a boxObject (x, y, width, height) for a specified element.
`boxObject = document.getBoxObjectFor(element);
boxObject is an nsIBoxObject.
element is a `DOMElement`.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/getBoxObjectFor`"
[this & args]
(-> this .-getBoxObjectFor (.apply this (clj->js args))))
(defn prepend
"Method.
The ParentNode.prepend() method inserts a set of `web.Node` objects
`web.dom.DOMString` objects before the first child of the `web.ParentNode`.
objects are inserted as equivalent `web.Text` nodes.
`ParentNode.prepend(...nodesToPrepend);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend`"
[this & args]
(-> this .-prepend (.apply this (clj->js args))))
(defn register-element
"Method.
The document.registerElement() method registers a new custom
in the browser and returns a constructor for the new element.
`var constructor = document.registerElement(tag-name, options);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/registerElement`"
[this & args]
(-> this .-registerElement (.apply this (clj->js args))))
(defn all
"Property.
The `web.Document` interface's read-only all property returns
`HTMLAllCollection` rooted at the document node. In other words,
returns the entire contents of the page.
`var htmlAllCollection = document.all;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/all`"
[this]
(-> this (.-all)))
(defn set-all!
"Property.
The `web.Document` interface's read-only all property returns
`HTMLAllCollection` rooted at the document node. In other words,
returns the entire contents of the page.
`var htmlAllCollection = document.all;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/all`"
[this val]
(aset this "all" val))
(defn anchors
"Property.
The anchors read-only property of the `web.Document` interface
a list of all of the anchors in the document.
`nodeList = document.anchors;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/anchors`"
[this]
(-> this (.-anchors)))
(defn set-anchors!
"Property.
The anchors read-only property of the `web.Document` interface
a list of all of the anchors in the document.
`nodeList = document.anchors;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/anchors`"
[this val]
(aset this "anchors" val))
(defn body
"Property.
The Document.body property represents the `<body>` or `<frameset>`
of the current document, or null if no such element exists.
`var objRef = document.body;
document.body = objRef;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/body`"
[this]
(-> this (.-body)))
(defn set-body!
"Property.
The Document.body property represents the `<body>` or `<frameset>`
of the current document, or null if no such element exists.
`var objRef = document.body;
document.body = objRef;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/body`"
[this val]
(aset this "body" val))
(defn character-set
"Property.
The Document.characterSet read-only property returns the character
of the document that it's currently rendered with.
`var string = document.characterSet;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/characterSet`"
[this]
(-> this (.-characterSet)))
(defn compat-mode
"Property.
The Document.compatMode property indicates whether the document
rendered in Quirks mode or Standards mode.
`mode = document.compatMode;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/compatMode`"
[this]
(-> this (.-compatMode)))
(defn set-compat-mode!
"Property.
The Document.compatMode property indicates whether the document
rendered in Quirks mode or Standards mode.
`mode = document.compatMode;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/compatMode`"
[this val]
(aset this "compatMode" val))
(defn content-type
"Property.
The Document.contentType read-only property returns the MIME
that the document is being rendered as. This may come from HTTP
or other sources of MIME information, and might be affected by
type conversions performed by either the browser or extensions.
`contentType = document.contentType;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/contentType`"
[this]
(-> this (.-contentType)))
(defn doctype
"Property.
Returns the Document Type Declaration (DTD) associated with current
The returned object implements the `web.DocumentType` interface.
`DOMImplementation.createDocumentType()` to create a DocumentType.
`doctype = document.doctype;
doctype is a read-only property.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/doctype`"
[this]
(-> this (.-doctype)))
(defn set-doctype!
"Property.
Returns the Document Type Declaration (DTD) associated with current
The returned object implements the `web.DocumentType` interface.
`DOMImplementation.createDocumentType()` to create a DocumentType.
`doctype = document.doctype;
doctype is a read-only property.`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/Document/doctype`"
[this val]
(aset this "doctype" val))
(defn document-element
"Property.
Document.documentElement returns the `web.Element` that is the
element of the `document` (for example, the `<html>` element
HTML documents).
`var element = document.documentElement;`