File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based
6
6
7
7
Breaking changes:
8
8
- Migrate FFI to ES modules (#51 by @JordanMartinez )
9
+ - Unwrap returned ` Effect ` for ` doctype ` (#52 by @JordanMartinez )
9
10
10
11
New features:
11
12
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ export const origin = getEffProp("origin");
12
12
export const compatMode = getEffProp ( "compatMode" ) ;
13
13
export const characterSet = getEffProp ( "characterSet" ) ;
14
14
export const contentType = getEffProp ( "contentType" ) ;
15
- export const _doctype = getEffProp ( "doctype" ) ;
15
+ export function _doctype ( doc ) {
16
+ return doc [ "doctype" ] ;
17
+ }
16
18
export const _documentElement = getEffProp ( "documentElement" ) ;
17
19
18
20
export function getElementsByTagName ( localName ) {
Original file line number Diff line number Diff line change @@ -89,10 +89,10 @@ foreign import compatMode :: Document -> Effect String
89
89
foreign import characterSet :: Document -> Effect String
90
90
foreign import contentType :: Document -> Effect String
91
91
92
- doctype :: Document -> Effect ( Maybe DocumentType )
93
- doctype = map toMaybe <<< _doctype
92
+ doctype :: Document -> Maybe DocumentType
93
+ doctype = toMaybe <<< _doctype
94
94
95
- foreign import _doctype :: Document -> Effect ( Nullable DocumentType )
95
+ foreign import _doctype :: Document -> Nullable DocumentType
96
96
97
97
documentElement :: Document -> Effect (Maybe Element )
98
98
documentElement = map toMaybe <<< _documentElement
You can’t perform that action at this time.
0 commit comments