Skip to content

Missing replaceWith #46

Open
Open
@schneiderfelipe

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);
    };
  };
};

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