-
Notifications
You must be signed in to change notification settings - Fork 24
Change type of documentElement? #7
Copy link
Copy link
Closed
Labels
purs-0.15A reminder to address this issue or merge this PR before we release PureScript v0.15.0A reminder to address this issue or merge this PR before we release PureScript v0.15.0type: breaking changeA change that requires a major version bump.A change that requires a major version bump.
Metadata
Metadata
Assignees
Labels
purs-0.15A reminder to address this issue or merge this PR before we release PureScript v0.15.0A reminder to address this issue or merge this PR before we release PureScript v0.15.0type: breaking changeA change that requires a major version bump.A change that requires a major version bump.
Type
Fields
Give feedbackNo fields configured for issues without a type.
From Q&A in Slack:
"""
Brandon Barker [4:04 PM]
Maybe this is more of an XML/DOM question, but looking at
documentElement :: Document -> Effect (Maybe Element)- I see no indication that it may benull(translated as aMaybehere) or that it might cause exceptions (which I'm assuming is the reason forEffect) - would appreciate any understanding on the choice of types herehttps://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-element for reference
garyb [4:45 PM]
@ Brandon Barker see the IDL here: https://www.w3.org/TR/dom/#document
it's perhaps a change between dom3 and dom4
you're right that
Effectmay be unnecessary here though since the document element is immutable, and it doesn't seem like accessing should raise an exception from a quick scan of the specBrandon Barker [9:16 PM]
ah, interesting, didn't know about DOM4
"""
This is regarding the type of the following
documentElementfunction:https://github.com/purescript-web/purescript-web-dom/blob/v2.0.0/src/Web/DOM/Document.purs#L89-L89