Skip to content

Missing replaceWith #46

Description

@schneiderfelipe

It seems that replaceWith is missing (spec & MDN).

A possible implementation would be

-- | Uses the first node as a replacement for the second node.
foreign import replaceWith :: Node -> Node -> Effect Unit
exports.replaceWith = function (newNode) {
  return function (oldNode) {
    return function () {
      oldNode.replaceWith(newNode);
    };
  };
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions