Skip to content

Commit baf201f

Browse files
authored
Node child manipulations return unit (#32)
1 parent 36baa45 commit baf201f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Web/DOM/Node.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ exports.insertBefore = function (node1) {
130130
return function (node2) {
131131
return function (parent) {
132132
return function () {
133-
return parent.insertBefore(node1, node2);
133+
parent.insertBefore(node1, node2);
134134
};
135135
};
136136
};
@@ -139,7 +139,7 @@ exports.insertBefore = function (node1) {
139139
exports.appendChild = function (node) {
140140
return function (parent) {
141141
return function () {
142-
return parent.appendChild(node);
142+
parent.appendChild(node);
143143
};
144144
};
145145
};
@@ -148,7 +148,7 @@ exports.replaceChild = function (newChild) {
148148
return function (oldChild) {
149149
return function (parent) {
150150
return function () {
151-
return parent.replaceChild(newChild, oldChild);
151+
parent.replaceChild(newChild, oldChild);
152152
};
153153
};
154154
};
@@ -157,7 +157,7 @@ exports.replaceChild = function (newChild) {
157157
exports.removeChild = function (node) {
158158
return function (parent) {
159159
return function () {
160-
return parent.removeChild(node);
160+
parent.removeChild(node);
161161
};
162162
};
163163
};

src/Web/DOM/Node.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ foreign import _lookupNamespaceURI :: String -> Node -> Effect (Nullable String)
176176
foreign import isDefaultNamespace :: String -> Node -> Effect Boolean
177177

178178
-- | Inserts the first node before the second as a child of the third node.
179-
foreign import insertBefore :: Node -> Node -> Node -> Effect Node
179+
foreign import insertBefore :: Node -> Node -> Node -> Effect Unit
180180

181181
-- | Appends the first node to the child node list of the second node.
182-
foreign import appendChild :: Node -> Node -> Effect Node
182+
foreign import appendChild :: Node -> Node -> Effect Unit
183183

184184
-- | Uses the first node as a replacement for the second node in the children
185185
-- | of the third node.
186-
foreign import replaceChild :: Node -> Node -> Node -> Effect Node
186+
foreign import replaceChild :: Node -> Node -> Node -> Effect Unit
187187

188188
-- | Removes the first node from the children of the second node.
189-
foreign import removeChild :: Node -> Node -> Effect Node
189+
foreign import removeChild :: Node -> Node -> Effect Unit

0 commit comments

Comments
 (0)