snabbdom-to-html
Version:
Render Snabbdom Vnodes to HTML strings
49 lines (42 loc) • 862 B
JavaScript
// All SVG children elements, not in this list, should self-close
exports.CONTAINER = {
// http://www.w3.org/TR/SVG/intro.html#TermContainerElement
'a': true,
'defs': true,
'glyph': true,
'g': true,
'marker': true,
'mask': true,
'missing-glyph': true,
'pattern': true,
'svg': true,
'switch': true,
'symbol': true,
'text': true,
'clipPath': true,
'linearGradient': true,
'style': true,
'script': true,
// http://www.w3.org/TR/SVG/intro.html#TermDescriptiveElement
'desc': true,
'metadata': true,
'title': true
}
// http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
exports.VOID = {
area: true,
base: true,
br: true,
col: true,
embed: true,
hr: true,
img: true,
input: true,
keygen: true,
link: true,
meta: true,
param: true,
source: true,
track: true,
wbr: true
}