File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
3
+ exports . _head = function ( doc ) {
4
+ return function ( ) {
5
+ return doc . head ;
6
+ } ;
7
+ } ;
8
+
3
9
exports . _body = function ( doc ) {
4
10
return function ( ) {
5
11
return doc . body ;
@@ -43,4 +49,4 @@ exports.setTitle = function (title) {
43
49
return { } ;
44
50
} ;
45
51
} ;
46
- } ;
52
+ } ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ module Web.HTML.HTMLDocument
10
10
, toParentNode
11
11
, toNonElementParentNode
12
12
, toEventTarget
13
+ , head
13
14
, body
14
15
, readyState
15
16
, activeElement
@@ -68,6 +69,11 @@ toNonElementParentNode = unsafeCoerce
68
69
toEventTarget :: HTMLDocument -> EventTarget
69
70
toEventTarget = unsafeCoerce
70
71
72
+ foreign import _head :: HTMLDocument -> Effect (Nullable HTMLElement )
73
+
74
+ head :: HTMLDocument -> Effect (Maybe HTMLElement )
75
+ head = map toMaybe <<< _head
76
+
71
77
foreign import _body :: HTMLDocument -> Effect (Nullable HTMLElement )
72
78
73
79
body :: HTMLDocument -> Effect (Maybe HTMLElement )
@@ -91,4 +97,4 @@ currentScript = map toMaybe <<< _currentScript
91
97
foreign import referrer :: HTMLDocument -> Effect String
92
98
93
99
foreign import title :: HTMLDocument -> Effect String
94
- foreign import setTitle :: String -> HTMLDocument -> Effect Unit
100
+ foreign import setTitle :: String -> HTMLDocument -> Effect Unit
You can’t perform that action at this time.
0 commit comments