mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-04 13:07:40 +08:00
fix SVG foreignObject (fix #4122)
This commit is contained in:
parent
5d36e8bc1b
commit
51725cff5e
@ -55,8 +55,9 @@ function _createElement (
|
||||
// unknown or unlisted namespaced elements
|
||||
// check at runtime because it may get assigned a namespace when its
|
||||
// parent normalizes children
|
||||
const childNs = tag === 'foreignObject' ? 'xhtml' : ns
|
||||
return new VNode(
|
||||
tag, data, normalizeChildren(children, ns),
|
||||
tag, data, normalizeChildren(children, childNs),
|
||||
undefined, undefined, ns, context
|
||||
)
|
||||
}
|
||||
|
@ -5,7 +5,8 @@ import { makeMap } from 'shared/util'
|
||||
|
||||
export const namespaceMap = {
|
||||
svg: 'http://www.w3.org/2000/svg',
|
||||
math: 'http://www.w3.org/1998/Math/MathML'
|
||||
math: 'http://www.w3.org/1998/Math/MathML',
|
||||
xhtml: 'http://www.w3.org/1999/xhtm'
|
||||
}
|
||||
|
||||
export const isHTMLTag = makeMap(
|
||||
|
Loading…
Reference in New Issue
Block a user