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
66
77Breaking changes:
88- Migrate FFI to ES modules (#51 by @JordanMartinez )
9+ - Unwrap returned ` Effect ` for ` doctype ` (#52 by @JordanMartinez )
910
1011New features:
1112
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ export const origin = getEffProp("origin");
1212export const compatMode = getEffProp ( "compatMode" ) ;
1313export const characterSet = getEffProp ( "characterSet" ) ;
1414export const contentType = getEffProp ( "contentType" ) ;
15- export const _doctype = getEffProp ( "doctype" ) ;
15+ export function _doctype ( doc ) {
16+ return doc [ "doctype" ] ;
17+ }
1618export const _documentElement = getEffProp ( "documentElement" ) ;
1719
1820export function getElementsByTagName ( localName ) {
Original file line number Diff line number Diff line change @@ -89,10 +89,10 @@ foreign import compatMode :: Document -> Effect String
8989foreign import characterSet :: Document -> Effect String
9090foreign import contentType :: Document -> Effect String
9191
92- doctype :: Document -> Effect ( Maybe DocumentType )
93- doctype = map toMaybe <<< _doctype
92+ doctype :: Document -> Maybe DocumentType
93+ doctype = toMaybe <<< _doctype
9494
95- foreign import _doctype :: Document -> Effect ( Nullable DocumentType )
95+ foreign import _doctype :: Document -> Nullable DocumentType
9696
9797documentElement :: Document -> Effect (Maybe Element )
9898documentElement = map toMaybe <<< _documentElement
You can’t perform that action at this time.
0 commit comments