Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 39d0ee7

Browse files
committed
Merge pull request #17 from purescript-contrib/16-getElementById
Fix NonElementParentNode/NonDocumentTypeChildNode APIs
2 parents e8a73fc + dafddbe commit 39d0ee7

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/DOM/Node/NonDocumentTypeChildNode.purs

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import Data.Nullable (Nullable())
77
import DOM
88
import DOM.Node.Types
99

10-
-- | The first element within node's descendants with a matching ID, or null if
11-
-- | no such element exists.
12-
foreign import getElementById :: forall eff. ElementId -> NonDocumentTypeChildNode -> Eff (dom :: DOM | eff) (Nullable Element)
10+
-- | The previous sibling that is an element, or null if no such element exists.
11+
foreign import previousElementSibling :: forall eff. NonDocumentTypeChildNode -> Eff (dom :: DOM | eff) (Nullable Element)
12+
13+
-- | The next sibling that is an element, or null if no such element exists.
14+
foreign import nextElementSibling :: forall eff. NonDocumentTypeChildNode -> Eff (dom :: DOM | eff) (Nullable Element)
15+

src/DOM/Node/NonElementParentNode.purs

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import Data.Nullable (Nullable())
77
import DOM
88
import DOM.Node.Types
99

10-
-- | The previous sibling that is an element, or null if no such element exists.
11-
foreign import previousElementSibling :: forall eff. NonElementParentNode -> Eff (dom :: DOM | eff) (Nullable Element)
12-
13-
-- | The next sibling that is an element, or null if no such element exists.
14-
foreign import nextElementSibling :: forall eff. NonElementParentNode -> Eff (dom :: DOM | eff) (Nullable Element)
10+
-- | The first element within node's descendants with a matching ID, or null if
11+
-- | no such element exists.
12+
foreign import getElementById :: forall eff. ElementId -> NonElementParentNode -> Eff (dom :: DOM | eff) (Nullable Element)

0 commit comments

Comments
 (0)