File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11"use strict" ;
22
3+ exports . _head = function ( doc ) {
4+ return function ( ) {
5+ return doc . head ;
6+ } ;
7+ } ;
8+
39exports . _body = function ( doc ) {
410 return function ( ) {
511 return doc . body ;
@@ -43,4 +49,4 @@ exports.setTitle = function (title) {
4349 return { } ;
4450 } ;
4551 } ;
46- } ;
52+ } ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ module Web.HTML.HTMLDocument
1010 , toParentNode
1111 , toNonElementParentNode
1212 , toEventTarget
13+ , head
1314 , body
1415 , readyState
1516 , activeElement
@@ -68,6 +69,11 @@ toNonElementParentNode = unsafeCoerce
6869toEventTarget :: HTMLDocument -> EventTarget
6970toEventTarget = unsafeCoerce
7071
72+ foreign import _head :: HTMLDocument -> Effect (Nullable HTMLElement )
73+
74+ head :: HTMLDocument -> Effect (Maybe HTMLElement )
75+ head = map toMaybe <<< _head
76+
7177foreign import _body :: HTMLDocument -> Effect (Nullable HTMLElement )
7278
7379body :: HTMLDocument -> Effect (Maybe HTMLElement )
@@ -91,4 +97,4 @@ currentScript = map toMaybe <<< _currentScript
9197foreign import referrer :: HTMLDocument -> Effect String
9298
9399foreign 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