/
Document.hs
1850 lines (1577 loc) · 84.6 KB
/
Document.hs
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
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE JavaScriptFFI #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.Document
(js_getAnimations, getAnimations, getAnimations_, js_newDocument,
newDocument, js_getElementsByTagName, getElementsByTagName,
getElementsByTagName_, js_getElementsByTagNameNS,
getElementsByTagNameNS, getElementsByTagNameNS_,
js_getElementsByClassName, getElementsByClassName,
getElementsByClassName_, js_createElement, createElement,
createElement_, js_createElementNS, createElementNS,
createElementNS_, js_createDocumentFragment,
createDocumentFragment, createDocumentFragment_, js_createTextNode,
createTextNode, createTextNode_, js_createCDATASection,
createCDATASection, createCDATASection_, js_createComment,
createComment, createComment_, js_createProcessingInstruction,
createProcessingInstruction, createProcessingInstruction_,
js_importNode, importNode, importNode_, js_adoptNode, adoptNode,
adoptNode_, js_createAttribute, createAttribute, createAttribute_,
js_createAttributeNS, createAttributeNS, createAttributeNS_,
js_createEvent, createEvent, createEvent_, js_createRange,
createRange, createRange_, js_createNodeIterator,
createNodeIterator, createNodeIterator_, js_createTreeWalker,
createTreeWalker, createTreeWalker_, js_getElementsByName,
getElementsByName, getElementsByName_, js_hasFocus, hasFocus,
hasFocus_, js_execCommand, execCommand, execCommand_,
js_queryCommandEnabled, queryCommandEnabled, queryCommandEnabled_,
js_queryCommandIndeterm, queryCommandIndeterm,
queryCommandIndeterm_, js_queryCommandState, queryCommandState,
queryCommandState_, js_queryCommandSupported,
queryCommandSupported, queryCommandSupported_,
js_queryCommandValue, queryCommandValue, queryCommandValue_,
js_getSelection, getSelection, getSelection_, getSelectionUnsafe,
getSelectionUnchecked, js_createExpression, createExpression,
createExpression_, js_createNSResolver, createNSResolver,
createNSResolver_, js_evaluate, evaluate, evaluate_,
js_webkitExitFullscreen, webkitExitFullscreen,
js_webkitCancelFullScreen, webkitCancelFullScreen,
js_exitPointerLock, exitPointerLock, js_getOverrideStyle,
getOverrideStyle, getOverrideStyle_, js_caretRangeFromPoint,
caretRangeFromPoint, caretRangeFromPoint_, js_getCSSCanvasContext,
getCSSCanvasContext, getCSSCanvasContext_, js_webkitGetNamedFlows,
webkitGetNamedFlows, webkitGetNamedFlows_, js_createTouch,
createTouch, createTouch_, js_createTouchList, createTouchList,
createTouchList_, js_getTimeline, getTimeline,
js_getImplementation, getImplementation, js_getURL, getURL,
js_getDocumentURI, getDocumentURI, js_getOrigin, getOrigin,
js_getCompatMode, getCompatMode, js_getCharacterSet,
getCharacterSet, js_getCharset, getCharset, js_getInputEncoding,
getInputEncoding, js_getContentType, getContentType, js_getDoctype,
getDoctype, getDoctypeUnsafe, getDoctypeUnchecked,
js_getDocumentElement, getDocumentElement,
getDocumentElementUnsafe, getDocumentElementUnchecked,
js_getLocation, getLocation, getLocationUnsafe,
getLocationUnchecked, js_setDomain, setDomain, js_getDomain,
getDomain, js_getReferrer, getReferrer, js_setCookie, setCookie,
js_getCookie, getCookie, js_getLastModified, getLastModified,
js_getReadyState, getReadyState, js_setTitle, setTitle,
js_getTitle, getTitle, js_setDir, setDir, js_getDir, getDir,
js_setBody, setBody, js_getBody, getBody, getBodyUnsafe,
getBodyUnchecked, js_getHead, getHead, getHeadUnsafe,
getHeadUnchecked, js_getImages, getImages, js_getEmbeds, getEmbeds,
js_getPlugins, getPlugins, js_getLinks, getLinks, js_getForms,
getForms, js_getScripts, getScripts, js_getCurrentScript,
getCurrentScript, getCurrentScriptUnsafe,
getCurrentScriptUnchecked, js_getDefaultView, getDefaultView,
getDefaultViewUnsafe, getDefaultViewUnchecked, js_setDesignMode,
setDesignMode, js_getDesignMode, getDesignMode, readyStateChange,
js_getStyleSheets, getStyleSheets, js_getScrollingElement,
getScrollingElement, getScrollingElementUnsafe,
getScrollingElementUnchecked, js_getWebkitFullscreenEnabled,
getWebkitFullscreenEnabled, js_getWebkitFullscreenElement,
getWebkitFullscreenElement, getWebkitFullscreenElementUnsafe,
getWebkitFullscreenElementUnchecked, js_getWebkitIsFullScreen,
getWebkitIsFullScreen, js_getWebkitFullScreenKeyboardInputAllowed,
getWebkitFullScreenKeyboardInputAllowed,
js_getWebkitCurrentFullScreenElement,
getWebkitCurrentFullScreenElement, webKitFullscreenChange,
webKitFullscreenError, pointerlockchange, pointerlockerror,
js_getFonts, getFonts, js_getHidden, getHidden,
js_getVisibilityState, getVisibilityState, visibilitychange,
js_getApplets, getApplets, js_getAnchors, getAnchors,
js_getPreferredStylesheetSet, getPreferredStylesheetSet,
getPreferredStylesheetSetUnsafe,
getPreferredStylesheetSetUnchecked, js_setSelectedStylesheetSet,
setSelectedStylesheetSet, js_getSelectedStylesheetSet,
getSelectedStylesheetSet, getSelectedStylesheetSetUnsafe,
getSelectedStylesheetSetUnchecked, js_getXmlEncoding,
getXmlEncoding, getXmlEncodingUnsafe, getXmlEncodingUnchecked,
js_setXmlVersion, setXmlVersion, js_getXmlVersion, getXmlVersion,
getXmlVersionUnsafe, getXmlVersionUnchecked, js_setXmlStandalone,
setXmlStandalone, js_getXmlStandalone, getXmlStandalone,
selectStart, selectionchange, js_getRootElement, getRootElement,
getRootElementUnsafe, getRootElementUnchecked, Document(..),
gTypeDocument, IsDocument, toDocument)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord)
import qualified Prelude (error)
import Data.Typeable (Typeable)
import GHCJS.Types (JSVal(..), JSString)
import GHCJS.Foreign (jsNull, jsUndefined)
import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..))
import GHCJS.Marshal (ToJSVal(..), FromJSVal(..))
import GHCJS.Marshal.Pure (PToJSVal(..), PFromJSVal(..))
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO(..))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import Data.Maybe (fromJust)
import Data.Traversable (mapM)
import GHCJS.DOM.Types
import Control.Applicative ((<$>))
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript unsafe "$1[\"getAnimations\"]()"
js_getAnimations :: Document -> IO JSVal
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getAnimations Mozilla Document.getAnimations documentation>
getAnimations ::
(MonadIO m, IsDocument self) => self -> m [Animation]
getAnimations self
= liftIO
((js_getAnimations (toDocument self)) >>= fromJSValUnchecked)
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getAnimations Mozilla Document.getAnimations documentation>
getAnimations_ :: (MonadIO m, IsDocument self) => self -> m ()
getAnimations_ self
= liftIO (void (js_getAnimations (toDocument self)))
foreign import javascript unsafe "new window[\"Document\"]()"
js_newDocument :: IO Document
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document Mozilla Document documentation>
newDocument :: (MonadIO m) => m Document
newDocument = liftIO (js_newDocument)
foreign import javascript unsafe "$1[\"getElementsByTagName\"]($2)"
js_getElementsByTagName ::
Document -> JSString -> IO HTMLCollection
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByTagName Mozilla Document.getElementsByTagName documentation>
getElementsByTagName ::
(MonadIO m, IsDocument self, ToJSString qualifiedName) =>
self -> qualifiedName -> m HTMLCollection
getElementsByTagName self qualifiedName
= liftIO
(js_getElementsByTagName (toDocument self)
(toJSString qualifiedName))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByTagName Mozilla Document.getElementsByTagName documentation>
getElementsByTagName_ ::
(MonadIO m, IsDocument self, ToJSString qualifiedName) =>
self -> qualifiedName -> m ()
getElementsByTagName_ self qualifiedName
= liftIO
(void
(js_getElementsByTagName (toDocument self)
(toJSString qualifiedName)))
foreign import javascript unsafe
"$1[\"getElementsByTagNameNS\"]($2,\n$3)" js_getElementsByTagNameNS
:: Document -> Optional JSString -> JSString -> IO HTMLCollection
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByTagNameNS Mozilla Document.getElementsByTagNameNS documentation>
getElementsByTagNameNS ::
(MonadIO m, IsDocument self, ToJSString namespaceURI,
ToJSString localName) =>
self -> Maybe namespaceURI -> localName -> m HTMLCollection
getElementsByTagNameNS self namespaceURI localName
= liftIO
(js_getElementsByTagNameNS (toDocument self)
(toOptionalJSString namespaceURI)
(toJSString localName))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByTagNameNS Mozilla Document.getElementsByTagNameNS documentation>
getElementsByTagNameNS_ ::
(MonadIO m, IsDocument self, ToJSString namespaceURI,
ToJSString localName) =>
self -> Maybe namespaceURI -> localName -> m ()
getElementsByTagNameNS_ self namespaceURI localName
= liftIO
(void
(js_getElementsByTagNameNS (toDocument self)
(toOptionalJSString namespaceURI)
(toJSString localName)))
foreign import javascript unsafe
"$1[\"getElementsByClassName\"]($2)" js_getElementsByClassName ::
Document -> JSString -> IO HTMLCollection
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByClassName Mozilla Document.getElementsByClassName documentation>
getElementsByClassName ::
(MonadIO m, IsDocument self, ToJSString classNames) =>
self -> classNames -> m HTMLCollection
getElementsByClassName self classNames
= liftIO
(js_getElementsByClassName (toDocument self)
(toJSString classNames))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByClassName Mozilla Document.getElementsByClassName documentation>
getElementsByClassName_ ::
(MonadIO m, IsDocument self, ToJSString classNames) =>
self -> classNames -> m ()
getElementsByClassName_ self classNames
= liftIO
(void
(js_getElementsByClassName (toDocument self)
(toJSString classNames)))
foreign import javascript safe "$1[\"createElement\"]($2)"
js_createElement :: Document -> JSString -> IO Element
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createElement Mozilla Document.createElement documentation>
createElement ::
(MonadIO m, IsDocument self, ToJSString localName) =>
self -> localName -> m Element
createElement self localName
= liftIO
(js_createElement (toDocument self) (toJSString localName))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createElement Mozilla Document.createElement documentation>
createElement_ ::
(MonadIO m, IsDocument self, ToJSString localName) =>
self -> localName -> m ()
createElement_ self localName
= liftIO
(void (js_createElement (toDocument self) (toJSString localName)))
foreign import javascript safe "$1[\"createElementNS\"]($2, $3)"
js_createElementNS ::
Document -> Optional JSString -> JSString -> IO Element
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createElementNS Mozilla Document.createElementNS documentation>
createElementNS ::
(MonadIO m, IsDocument self, ToJSString namespaceURI,
ToJSString qualifiedName) =>
self -> Maybe namespaceURI -> qualifiedName -> m Element
createElementNS self namespaceURI qualifiedName
= liftIO
(js_createElementNS (toDocument self)
(toOptionalJSString namespaceURI)
(toJSString qualifiedName))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createElementNS Mozilla Document.createElementNS documentation>
createElementNS_ ::
(MonadIO m, IsDocument self, ToJSString namespaceURI,
ToJSString qualifiedName) =>
self -> Maybe namespaceURI -> qualifiedName -> m ()
createElementNS_ self namespaceURI qualifiedName
= liftIO
(void
(js_createElementNS (toDocument self)
(toOptionalJSString namespaceURI)
(toJSString qualifiedName)))
foreign import javascript unsafe "$1[\"createDocumentFragment\"]()"
js_createDocumentFragment :: Document -> IO DocumentFragment
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createDocumentFragment Mozilla Document.createDocumentFragment documentation>
createDocumentFragment ::
(MonadIO m, IsDocument self) => self -> m DocumentFragment
createDocumentFragment self
= liftIO (js_createDocumentFragment (toDocument self))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createDocumentFragment Mozilla Document.createDocumentFragment documentation>
createDocumentFragment_ ::
(MonadIO m, IsDocument self) => self -> m ()
createDocumentFragment_ self
= liftIO (void (js_createDocumentFragment (toDocument self)))
foreign import javascript unsafe "$1[\"createTextNode\"]($2)"
js_createTextNode :: Document -> JSString -> IO Text
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createTextNode Mozilla Document.createTextNode documentation>
createTextNode ::
(MonadIO m, IsDocument self, ToJSString data') =>
self -> data' -> m Text
createTextNode self data'
= liftIO (js_createTextNode (toDocument self) (toJSString data'))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createTextNode Mozilla Document.createTextNode documentation>
createTextNode_ ::
(MonadIO m, IsDocument self, ToJSString data') =>
self -> data' -> m ()
createTextNode_ self data'
= liftIO
(void (js_createTextNode (toDocument self) (toJSString data')))
foreign import javascript safe "$1[\"createCDATASection\"]($2)"
js_createCDATASection :: Document -> JSString -> IO CDATASection
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createCDATASection Mozilla Document.createCDATASection documentation>
createCDATASection ::
(MonadIO m, IsDocument self, ToJSString data') =>
self -> data' -> m CDATASection
createCDATASection self data'
= liftIO
(js_createCDATASection (toDocument self) (toJSString data'))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createCDATASection Mozilla Document.createCDATASection documentation>
createCDATASection_ ::
(MonadIO m, IsDocument self, ToJSString data') =>
self -> data' -> m ()
createCDATASection_ self data'
= liftIO
(void (js_createCDATASection (toDocument self) (toJSString data')))
foreign import javascript unsafe "$1[\"createComment\"]($2)"
js_createComment :: Document -> JSString -> IO Comment
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createComment Mozilla Document.createComment documentation>
createComment ::
(MonadIO m, IsDocument self, ToJSString data') =>
self -> data' -> m Comment
createComment self data'
= liftIO (js_createComment (toDocument self) (toJSString data'))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createComment Mozilla Document.createComment documentation>
createComment_ ::
(MonadIO m, IsDocument self, ToJSString data') =>
self -> data' -> m ()
createComment_ self data'
= liftIO
(void (js_createComment (toDocument self) (toJSString data')))
foreign import javascript safe
"$1[\"createProcessingInstruction\"]($2,\n$3)"
js_createProcessingInstruction ::
Document -> JSString -> JSString -> IO ProcessingInstruction
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createProcessingInstruction Mozilla Document.createProcessingInstruction documentation>
createProcessingInstruction ::
(MonadIO m, IsDocument self, ToJSString target,
ToJSString data') =>
self -> target -> data' -> m ProcessingInstruction
createProcessingInstruction self target data'
= liftIO
(js_createProcessingInstruction (toDocument self)
(toJSString target)
(toJSString data'))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createProcessingInstruction Mozilla Document.createProcessingInstruction documentation>
createProcessingInstruction_ ::
(MonadIO m, IsDocument self, ToJSString target,
ToJSString data') =>
self -> target -> data' -> m ()
createProcessingInstruction_ self target data'
= liftIO
(void
(js_createProcessingInstruction (toDocument self)
(toJSString target)
(toJSString data')))
foreign import javascript safe "$1[\"importNode\"]($2, $3)"
js_importNode :: Document -> Node -> Bool -> IO Node
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.importNode Mozilla Document.importNode documentation>
importNode ::
(MonadIO m, IsDocument self, IsNode node) =>
self -> node -> Bool -> m Node
importNode self node deep
= liftIO (js_importNode (toDocument self) (toNode node) deep)
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.importNode Mozilla Document.importNode documentation>
importNode_ ::
(MonadIO m, IsDocument self, IsNode node) =>
self -> node -> Bool -> m ()
importNode_ self node deep
= liftIO
(void (js_importNode (toDocument self) (toNode node) deep))
foreign import javascript safe "$1[\"adoptNode\"]($2)" js_adoptNode
:: Document -> Node -> IO Node
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.adoptNode Mozilla Document.adoptNode documentation>
adoptNode ::
(MonadIO m, IsDocument self, IsNode node) => self -> node -> m Node
adoptNode self node
= liftIO (js_adoptNode (toDocument self) (toNode node))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.adoptNode Mozilla Document.adoptNode documentation>
adoptNode_ ::
(MonadIO m, IsDocument self, IsNode node) => self -> node -> m ()
adoptNode_ self node
= liftIO (void (js_adoptNode (toDocument self) (toNode node)))
foreign import javascript safe "$1[\"createAttribute\"]($2)"
js_createAttribute :: Document -> JSString -> IO Attr
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createAttribute Mozilla Document.createAttribute documentation>
createAttribute ::
(MonadIO m, IsDocument self, ToJSString localName) =>
self -> localName -> m Attr
createAttribute self localName
= liftIO
(js_createAttribute (toDocument self) (toJSString localName))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createAttribute Mozilla Document.createAttribute documentation>
createAttribute_ ::
(MonadIO m, IsDocument self, ToJSString localName) =>
self -> localName -> m ()
createAttribute_ self localName
= liftIO
(void
(js_createAttribute (toDocument self) (toJSString localName)))
foreign import javascript safe "$1[\"createAttributeNS\"]($2, $3)"
js_createAttributeNS ::
Document -> Optional JSString -> JSString -> IO Attr
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createAttributeNS Mozilla Document.createAttributeNS documentation>
createAttributeNS ::
(MonadIO m, IsDocument self, ToJSString namespaceURI,
ToJSString qualifiedName) =>
self -> Maybe namespaceURI -> qualifiedName -> m Attr
createAttributeNS self namespaceURI qualifiedName
= liftIO
(js_createAttributeNS (toDocument self)
(toOptionalJSString namespaceURI)
(toJSString qualifiedName))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createAttributeNS Mozilla Document.createAttributeNS documentation>
createAttributeNS_ ::
(MonadIO m, IsDocument self, ToJSString namespaceURI,
ToJSString qualifiedName) =>
self -> Maybe namespaceURI -> qualifiedName -> m ()
createAttributeNS_ self namespaceURI qualifiedName
= liftIO
(void
(js_createAttributeNS (toDocument self)
(toOptionalJSString namespaceURI)
(toJSString qualifiedName)))
foreign import javascript safe "$1[\"createEvent\"]($2)"
js_createEvent :: Document -> JSString -> IO Event
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createEvent Mozilla Document.createEvent documentation>
createEvent ::
(MonadIO m, IsDocument self, ToJSString type') =>
self -> type' -> m Event
createEvent self type'
= liftIO (js_createEvent (toDocument self) (toJSString type'))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createEvent Mozilla Document.createEvent documentation>
createEvent_ ::
(MonadIO m, IsDocument self, ToJSString type') =>
self -> type' -> m ()
createEvent_ self type'
= liftIO
(void (js_createEvent (toDocument self) (toJSString type')))
foreign import javascript unsafe "$1[\"createRange\"]()"
js_createRange :: Document -> IO Range
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createRange Mozilla Document.createRange documentation>
createRange :: (MonadIO m, IsDocument self) => self -> m Range
createRange self = liftIO (js_createRange (toDocument self))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createRange Mozilla Document.createRange documentation>
createRange_ :: (MonadIO m, IsDocument self) => self -> m ()
createRange_ self
= liftIO (void (js_createRange (toDocument self)))
foreign import javascript unsafe
"$1[\"createNodeIterator\"]($2, $3,\n$4)" js_createNodeIterator ::
Document ->
Node -> Optional Word -> Optional NodeFilter -> IO NodeIterator
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createNodeIterator Mozilla Document.createNodeIterator documentation>
createNodeIterator ::
(MonadIO m, IsDocument self, IsNode root) =>
self -> root -> Maybe Word -> Maybe NodeFilter -> m NodeIterator
createNodeIterator self root whatToShow filter
= liftIO
(js_createNodeIterator (toDocument self) (toNode root)
(maybeToOptional whatToShow)
(maybeToOptional filter))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createNodeIterator Mozilla Document.createNodeIterator documentation>
createNodeIterator_ ::
(MonadIO m, IsDocument self, IsNode root) =>
self -> root -> Maybe Word -> Maybe NodeFilter -> m ()
createNodeIterator_ self root whatToShow filter
= liftIO
(void
(js_createNodeIterator (toDocument self) (toNode root)
(maybeToOptional whatToShow)
(maybeToOptional filter)))
foreign import javascript unsafe
"$1[\"createTreeWalker\"]($2, $3,\n$4)" js_createTreeWalker ::
Document ->
Node -> Optional Word -> Optional NodeFilter -> IO TreeWalker
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createTreeWalker Mozilla Document.createTreeWalker documentation>
createTreeWalker ::
(MonadIO m, IsDocument self, IsNode root) =>
self -> root -> Maybe Word -> Maybe NodeFilter -> m TreeWalker
createTreeWalker self root whatToShow filter
= liftIO
(js_createTreeWalker (toDocument self) (toNode root)
(maybeToOptional whatToShow)
(maybeToOptional filter))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createTreeWalker Mozilla Document.createTreeWalker documentation>
createTreeWalker_ ::
(MonadIO m, IsDocument self, IsNode root) =>
self -> root -> Maybe Word -> Maybe NodeFilter -> m ()
createTreeWalker_ self root whatToShow filter
= liftIO
(void
(js_createTreeWalker (toDocument self) (toNode root)
(maybeToOptional whatToShow)
(maybeToOptional filter)))
foreign import javascript unsafe "$1[\"getElementsByName\"]($2)"
js_getElementsByName :: Document -> JSString -> IO NodeList
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByName Mozilla Document.getElementsByName documentation>
getElementsByName ::
(MonadIO m, IsDocument self, ToJSString elementName) =>
self -> elementName -> m NodeList
getElementsByName self elementName
= liftIO
(js_getElementsByName (toDocument self) (toJSString elementName))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getElementsByName Mozilla Document.getElementsByName documentation>
getElementsByName_ ::
(MonadIO m, IsDocument self, ToJSString elementName) =>
self -> elementName -> m ()
getElementsByName_ self elementName
= liftIO
(void
(js_getElementsByName (toDocument self) (toJSString elementName)))
foreign import javascript unsafe "($1[\"hasFocus\"]() ? 1 : 0)"
js_hasFocus :: Document -> IO Bool
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.hasFocus Mozilla Document.hasFocus documentation>
hasFocus :: (MonadIO m, IsDocument self) => self -> m Bool
hasFocus self = liftIO (js_hasFocus (toDocument self))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.hasFocus Mozilla Document.hasFocus documentation>
hasFocus_ :: (MonadIO m, IsDocument self) => self -> m ()
hasFocus_ self = liftIO (void (js_hasFocus (toDocument self)))
foreign import javascript unsafe
"($1[\"execCommand\"]($2, $3,\n$4) ? 1 : 0)" js_execCommand ::
Document -> JSString -> Bool -> Optional JSString -> IO Bool
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.execCommand Mozilla Document.execCommand documentation>
execCommand ::
(MonadIO m, IsDocument self, ToJSString commandId,
ToJSString value) =>
self -> commandId -> Bool -> Maybe value -> m Bool
execCommand self commandId showUI value
= liftIO
(js_execCommand (toDocument self) (toJSString commandId) showUI
(toOptionalJSString value))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.execCommand Mozilla Document.execCommand documentation>
execCommand_ ::
(MonadIO m, IsDocument self, ToJSString commandId,
ToJSString value) =>
self -> commandId -> Bool -> Maybe value -> m ()
execCommand_ self commandId showUI value
= liftIO
(void
(js_execCommand (toDocument self) (toJSString commandId) showUI
(toOptionalJSString value)))
foreign import javascript unsafe
"($1[\"queryCommandEnabled\"]($2) ? 1 : 0)" js_queryCommandEnabled
:: Document -> JSString -> IO Bool
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandEnabled Mozilla Document.queryCommandEnabled documentation>
queryCommandEnabled ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m Bool
queryCommandEnabled self commandId
= liftIO
(js_queryCommandEnabled (toDocument self) (toJSString commandId))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandEnabled Mozilla Document.queryCommandEnabled documentation>
queryCommandEnabled_ ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m ()
queryCommandEnabled_ self commandId
= liftIO
(void
(js_queryCommandEnabled (toDocument self) (toJSString commandId)))
foreign import javascript unsafe
"($1[\"queryCommandIndeterm\"]($2) ? 1 : 0)"
js_queryCommandIndeterm :: Document -> JSString -> IO Bool
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandIndeterm Mozilla Document.queryCommandIndeterm documentation>
queryCommandIndeterm ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m Bool
queryCommandIndeterm self commandId
= liftIO
(js_queryCommandIndeterm (toDocument self) (toJSString commandId))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandIndeterm Mozilla Document.queryCommandIndeterm documentation>
queryCommandIndeterm_ ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m ()
queryCommandIndeterm_ self commandId
= liftIO
(void
(js_queryCommandIndeterm (toDocument self) (toJSString commandId)))
foreign import javascript unsafe
"($1[\"queryCommandState\"]($2) ? 1 : 0)" js_queryCommandState ::
Document -> JSString -> IO Bool
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandState Mozilla Document.queryCommandState documentation>
queryCommandState ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m Bool
queryCommandState self commandId
= liftIO
(js_queryCommandState (toDocument self) (toJSString commandId))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandState Mozilla Document.queryCommandState documentation>
queryCommandState_ ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m ()
queryCommandState_ self commandId
= liftIO
(void
(js_queryCommandState (toDocument self) (toJSString commandId)))
foreign import javascript unsafe
"($1[\"queryCommandSupported\"]($2) ? 1 : 0)"
js_queryCommandSupported :: Document -> JSString -> IO Bool
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandSupported Mozilla Document.queryCommandSupported documentation>
queryCommandSupported ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m Bool
queryCommandSupported self commandId
= liftIO
(js_queryCommandSupported (toDocument self) (toJSString commandId))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandSupported Mozilla Document.queryCommandSupported documentation>
queryCommandSupported_ ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m ()
queryCommandSupported_ self commandId
= liftIO
(void
(js_queryCommandSupported (toDocument self)
(toJSString commandId)))
foreign import javascript unsafe "$1[\"queryCommandValue\"]($2)"
js_queryCommandValue :: Document -> JSString -> IO JSString
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandValue Mozilla Document.queryCommandValue documentation>
queryCommandValue ::
(MonadIO m, IsDocument self, ToJSString commandId,
FromJSString result) =>
self -> commandId -> m result
queryCommandValue self commandId
= liftIO
(fromJSString <$>
(js_queryCommandValue (toDocument self) (toJSString commandId)))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.queryCommandValue Mozilla Document.queryCommandValue documentation>
queryCommandValue_ ::
(MonadIO m, IsDocument self, ToJSString commandId) =>
self -> commandId -> m ()
queryCommandValue_ self commandId
= liftIO
(void
(js_queryCommandValue (toDocument self) (toJSString commandId)))
foreign import javascript unsafe "$1[\"getSelection\"]()"
js_getSelection :: Document -> IO (Nullable Selection)
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getSelection Mozilla Document.getSelection documentation>
getSelection ::
(MonadIO m, IsDocument self) => self -> m (Maybe Selection)
getSelection self
= liftIO (nullableToMaybe <$> (js_getSelection (toDocument self)))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getSelection Mozilla Document.getSelection documentation>
getSelection_ :: (MonadIO m, IsDocument self) => self -> m ()
getSelection_ self
= liftIO (void (js_getSelection (toDocument self)))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getSelection Mozilla Document.getSelection documentation>
getSelectionUnsafe ::
(MonadIO m, IsDocument self, HasCallStack) => self -> m Selection
getSelectionUnsafe self
= liftIO
((nullableToMaybe <$> (js_getSelection (toDocument self))) >>=
maybe (Prelude.error "Nothing to return") return)
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getSelection Mozilla Document.getSelection documentation>
getSelectionUnchecked ::
(MonadIO m, IsDocument self) => self -> m Selection
getSelectionUnchecked self
= liftIO
(fromJust . nullableToMaybe <$>
(js_getSelection (toDocument self)))
foreign import javascript safe "$1[\"createExpression\"]($2, $3)"
js_createExpression ::
Document ->
Optional JSString -> Optional XPathNSResolver -> IO XPathExpression
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createExpression Mozilla Document.createExpression documentation>
createExpression ::
(MonadIO m, IsDocument self, ToJSString expression) =>
self ->
Maybe expression -> Maybe XPathNSResolver -> m XPathExpression
createExpression self expression resolver
= liftIO
(js_createExpression (toDocument self)
(toOptionalJSString expression)
(maybeToOptional resolver))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createExpression Mozilla Document.createExpression documentation>
createExpression_ ::
(MonadIO m, IsDocument self, ToJSString expression) =>
self -> Maybe expression -> Maybe XPathNSResolver -> m ()
createExpression_ self expression resolver
= liftIO
(void
(js_createExpression (toDocument self)
(toOptionalJSString expression)
(maybeToOptional resolver)))
foreign import javascript unsafe "$1[\"createNSResolver\"]($2)"
js_createNSResolver ::
Document -> Optional Node -> IO XPathNSResolver
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createNSResolver Mozilla Document.createNSResolver documentation>
createNSResolver ::
(MonadIO m, IsDocument self, IsNode nodeResolver) =>
self -> Maybe nodeResolver -> m XPathNSResolver
createNSResolver self nodeResolver
= liftIO
(js_createNSResolver (toDocument self)
(maybeToOptional (fmap toNode nodeResolver)))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createNSResolver Mozilla Document.createNSResolver documentation>
createNSResolver_ ::
(MonadIO m, IsDocument self, IsNode nodeResolver) =>
self -> Maybe nodeResolver -> m ()
createNSResolver_ self nodeResolver
= liftIO
(void
(js_createNSResolver (toDocument self)
(maybeToOptional (fmap toNode nodeResolver))))
foreign import javascript safe
"$1[\"evaluate\"]($2, $3, $4, $5,\n$6)" js_evaluate ::
Document ->
Optional JSString ->
Optional Node ->
Optional XPathNSResolver ->
Optional Word -> Optional XPathResult -> IO XPathResult
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.evaluate Mozilla Document.evaluate documentation>
evaluate ::
(MonadIO m, IsDocument self, ToJSString expression,
IsNode contextNode) =>
self ->
Maybe expression ->
Maybe contextNode ->
Maybe XPathNSResolver ->
Maybe Word -> Maybe XPathResult -> m XPathResult
evaluate self expression contextNode resolver type' inResult
= liftIO
(js_evaluate (toDocument self) (toOptionalJSString expression)
(maybeToOptional (fmap toNode contextNode))
(maybeToOptional resolver)
(maybeToOptional type')
(maybeToOptional inResult))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.evaluate Mozilla Document.evaluate documentation>
evaluate_ ::
(MonadIO m, IsDocument self, ToJSString expression,
IsNode contextNode) =>
self ->
Maybe expression ->
Maybe contextNode ->
Maybe XPathNSResolver -> Maybe Word -> Maybe XPathResult -> m ()
evaluate_ self expression contextNode resolver type' inResult
= liftIO
(void
(js_evaluate (toDocument self) (toOptionalJSString expression)
(maybeToOptional (fmap toNode contextNode))
(maybeToOptional resolver)
(maybeToOptional type')
(maybeToOptional inResult)))
foreign import javascript unsafe "$1[\"webkitExitFullscreen\"]()"
js_webkitExitFullscreen :: Document -> IO ()
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.webkitExitFullscreen Mozilla Document.webkitExitFullscreen documentation>
webkitExitFullscreen ::
(MonadIO m, IsDocument self) => self -> m ()
webkitExitFullscreen self
= liftIO (js_webkitExitFullscreen (toDocument self))
foreign import javascript unsafe "$1[\"webkitCancelFullScreen\"]()"
js_webkitCancelFullScreen :: Document -> IO ()
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.webkitCancelFullScreen Mozilla Document.webkitCancelFullScreen documentation>
webkitCancelFullScreen ::
(MonadIO m, IsDocument self) => self -> m ()
webkitCancelFullScreen self
= liftIO (js_webkitCancelFullScreen (toDocument self))
foreign import javascript unsafe "$1[\"exitPointerLock\"]()"
js_exitPointerLock :: Document -> IO ()
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.exitPointerLock Mozilla Document.exitPointerLock documentation>
exitPointerLock :: (MonadIO m, IsDocument self) => self -> m ()
exitPointerLock self
= liftIO (js_exitPointerLock (toDocument self))
foreign import javascript unsafe "$1[\"getOverrideStyle\"]($2, $3)"
js_getOverrideStyle ::
Document ->
Optional Element -> Optional JSString -> IO CSSStyleDeclaration
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getOverrideStyle Mozilla Document.getOverrideStyle documentation>
getOverrideStyle ::
(MonadIO m, IsDocument self, IsElement element,
ToJSString pseudoElement) =>
self ->
Maybe element -> Maybe pseudoElement -> m CSSStyleDeclaration
getOverrideStyle self element pseudoElement
= liftIO
(js_getOverrideStyle (toDocument self)
(maybeToOptional (fmap toElement element))
(toOptionalJSString pseudoElement))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getOverrideStyle Mozilla Document.getOverrideStyle documentation>
getOverrideStyle_ ::
(MonadIO m, IsDocument self, IsElement element,
ToJSString pseudoElement) =>
self -> Maybe element -> Maybe pseudoElement -> m ()
getOverrideStyle_ self element pseudoElement
= liftIO
(void
(js_getOverrideStyle (toDocument self)
(maybeToOptional (fmap toElement element))
(toOptionalJSString pseudoElement)))
foreign import javascript unsafe
"$1[\"caretRangeFromPoint\"]($2,\n$3)" js_caretRangeFromPoint ::
Document -> Optional Int -> Optional Int -> IO Range
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.caretRangeFromPoint Mozilla Document.caretRangeFromPoint documentation>
caretRangeFromPoint ::
(MonadIO m, IsDocument self) =>
self -> Maybe Int -> Maybe Int -> m Range
caretRangeFromPoint self x y
= liftIO
(js_caretRangeFromPoint (toDocument self) (maybeToOptional x)
(maybeToOptional y))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.caretRangeFromPoint Mozilla Document.caretRangeFromPoint documentation>
caretRangeFromPoint_ ::
(MonadIO m, IsDocument self) =>
self -> Maybe Int -> Maybe Int -> m ()
caretRangeFromPoint_ self x y
= liftIO
(void
(js_caretRangeFromPoint (toDocument self) (maybeToOptional x)
(maybeToOptional y)))
foreign import javascript unsafe
"$1[\"getCSSCanvasContext\"]($2,\n$3, $4, $5)"
js_getCSSCanvasContext ::
Document ->
JSString -> JSString -> Int -> Int -> IO RenderingContext
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getCSSCanvasContext Mozilla Document.getCSSCanvasContext documentation>
getCSSCanvasContext ::
(MonadIO m, IsDocument self, ToJSString contextId,
ToJSString name) =>
self -> contextId -> name -> Int -> Int -> m RenderingContext
getCSSCanvasContext self contextId name width height
= liftIO
(js_getCSSCanvasContext (toDocument self) (toJSString contextId)
(toJSString name)
width
height)
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.getCSSCanvasContext Mozilla Document.getCSSCanvasContext documentation>
getCSSCanvasContext_ ::
(MonadIO m, IsDocument self, ToJSString contextId,
ToJSString name) =>
self -> contextId -> name -> Int -> Int -> m ()
getCSSCanvasContext_ self contextId name width height
= liftIO
(void
(js_getCSSCanvasContext (toDocument self) (toJSString contextId)
(toJSString name)
width
height))
foreign import javascript unsafe "$1[\"webkitGetNamedFlows\"]()"
js_webkitGetNamedFlows :: Document -> IO DOMNamedFlowCollection
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.webkitGetNamedFlows Mozilla Document.webkitGetNamedFlows documentation>
webkitGetNamedFlows ::
(MonadIO m, IsDocument self) => self -> m DOMNamedFlowCollection
webkitGetNamedFlows self
= liftIO (js_webkitGetNamedFlows (toDocument self))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.webkitGetNamedFlows Mozilla Document.webkitGetNamedFlows documentation>
webkitGetNamedFlows_ ::
(MonadIO m, IsDocument self) => self -> m ()
webkitGetNamedFlows_ self
= liftIO (void (js_webkitGetNamedFlows (toDocument self)))
foreign import javascript unsafe
"$1[\"createTouch\"]($2, $3, $4,\n$5, $6, $7, $8, $9, $10, $11,\n$12)"
js_createTouch ::
Document ->
Optional Window ->
Optional EventTarget ->
Optional Int ->
Optional Int ->
Optional Int ->
Optional Int ->
Optional Int ->
Optional Int ->
Optional Int -> Optional Float -> Optional Float -> IO Touch
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createTouch Mozilla Document.createTouch documentation>
createTouch ::
(MonadIO m, IsDocument self, IsEventTarget target) =>
self ->
Maybe Window ->
Maybe target ->
Maybe Int ->
Maybe Int ->
Maybe Int ->
Maybe Int ->
Maybe Int ->
Maybe Int -> Maybe Int -> Maybe Float -> Maybe Float -> m Touch
createTouch self window target identifier pageX pageY screenX
screenY webkitRadiusX webkitRadiusY webkitRotationAngle webkitForce
= liftIO
(js_createTouch (toDocument self) (maybeToOptional window)
(maybeToOptional (fmap toEventTarget target))
(maybeToOptional identifier)
(maybeToOptional pageX)
(maybeToOptional pageY)
(maybeToOptional screenX)
(maybeToOptional screenY)
(maybeToOptional webkitRadiusX)
(maybeToOptional webkitRadiusY)
(maybeToOptional webkitRotationAngle)
(maybeToOptional webkitForce))
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createTouch Mozilla Document.createTouch documentation>
createTouch_ ::
(MonadIO m, IsDocument self, IsEventTarget target) =>
self ->
Maybe Window ->
Maybe target ->
Maybe Int ->
Maybe Int ->
Maybe Int ->
Maybe Int ->
Maybe Int ->
Maybe Int -> Maybe Int -> Maybe Float -> Maybe Float -> m ()
createTouch_ self window target identifier pageX pageY screenX
screenY webkitRadiusX webkitRadiusY webkitRotationAngle webkitForce
= liftIO
(void
(js_createTouch (toDocument self) (maybeToOptional window)
(maybeToOptional (fmap toEventTarget target))
(maybeToOptional identifier)
(maybeToOptional pageX)
(maybeToOptional pageY)
(maybeToOptional screenX)
(maybeToOptional screenY)
(maybeToOptional webkitRadiusX)
(maybeToOptional webkitRadiusY)
(maybeToOptional webkitRotationAngle)
(maybeToOptional webkitForce)))
foreign import javascript unsafe "$1[\"createTouchList\"]($2)"
js_createTouchList :: Document -> JSVal -> IO TouchList
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createTouchList Mozilla Document.createTouchList documentation>