How to use the domutils.replaceElement function in domutils

To help you get started, we’ve selected a few domutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github superfly / fly / packages / v8env / src / document.ts View on Github external
public replaceWith(html) {
    if (html instanceof Element) {
      replaceElement(this._dom, html._dom)
      return
    }
    replaceElement(this._dom, parseDOMSync(html)[0])
  }
github superfly / fly / packages / v8env / src / document.ts View on Github external
public replaceWith(html) {
    if (html instanceof Element) {
      replaceElement(this._dom, html._dom)
      return
    }
    replaceElement(this._dom, parseDOMSync(html)[0])
  }