npm.io
0.2.10 • Published 3 years ago

renaissance-append-html

Licence
MIT
Version
0.2.10
Deps
0
Size
7 kB
Vulns
0
Weekly
0

renaissance-append-html

Test Status

renaissance appendHTML adapter

Usage

const { r } = require('renaissance')
const AppendHtmlAdapter = require('renaissance-append-html')
const adapter = r.registerAdapter('appendHTML', AppendHtmlAdapter)

adapter.appendHTML('<p>appendHTML</p>', document.getElementsByTagname('body')[0], function(children) { console.log(children) })
// OR
r.adapters.appendHTML.appendHTML('<p>appendHTML</p>', document.getElementsByTagname('body')[0], function(children) { console.log(children) })

API

adapter.appendHTML({string} html, {object} node, {function} cb)

Append html to node and run cb, if present

Development

  • Build with npm run build
  • Test with npm run test

Contributing

See CONTRIBUTING

Credits

See CREDITS

License

MIT (c) 2017 - 2023 frncsdrk and contributors

Keywords