You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
489 B
JavaScript
16 lines
489 B
JavaScript
5 years ago
|
import { init } from '../../es/snabbdom.js'
|
||
|
import attrs from '../../es/modules/attributes.js'
|
||
|
import h from '../../es/h.js'
|
||
|
|
||
|
var patch = init([attrs])
|
||
9 years ago
|
|
||
|
window.addEventListener('DOMContentLoaded', () => {
|
||
5 years ago
|
var container = document.getElementById('container')
|
||
9 years ago
|
var vnode = h('div', [
|
||
5 years ago
|
h('svg', { attrs: { width: 100, height: 100 } }, [
|
||
|
h('circle', { attrs: { cx: 50, cy: 50, r: 40, stroke: 'green', 'stroke-width': 4, fill: 'yellow' } })
|
||
9 years ago
|
])
|
||
5 years ago
|
])
|
||
|
patch(container, vnode)
|
||
|
})
|