Skip to content

Changed node child helpers to return Unit #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Web/DOM/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ exports.insertBefore = function (node1) {
return function (node2) {
return function (parent) {
return function () {
return parent.insertBefore(node1, node2);
parent.insertBefore(node1, node2);
};
};
};
Expand All @@ -139,7 +139,7 @@ exports.insertBefore = function (node1) {
exports.appendChild = function (node) {
return function (parent) {
return function () {
return parent.appendChild(node);
parent.appendChild(node);
};
};
};
Expand All @@ -148,7 +148,7 @@ exports.replaceChild = function (newChild) {
return function (oldChild) {
return function (parent) {
return function () {
return parent.replaceChild(newChild, oldChild);
parent.replaceChild(newChild, oldChild);
};
};
};
Expand All @@ -157,7 +157,7 @@ exports.replaceChild = function (newChild) {
exports.removeChild = function (node) {
return function (parent) {
return function () {
return parent.removeChild(node);
parent.removeChild(node);
};
};
};
8 changes: 4 additions & 4 deletions src/Web/DOM/Node.purs
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ foreign import _lookupNamespaceURI :: String -> Node -> Effect (Nullable String)
foreign import isDefaultNamespace :: String -> Node -> Effect Boolean

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

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

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

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