Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var html = require('./index')
- var world = 'xyz'
- var planet = [
- document.createElement('strong')
- ]
- planet[0].textContent = 'planet'
- var res = html.render(Main(world, planet))
- function Main (world, who) {
- return html`
- <div id="hello" class='def ${world}'>
- hello
- ${who}
- </div>
- `
- }
- setTimeout(function () {
- res.update(Main(
- "abc",
- document.createTextNode('planet')
- ))
- }, 3000)
- console.log(res)
- document.body.appendChild(res.element)
Add Comment
Please, Sign In to add comment