提交 422c6318 编写于 作者: M Matthew Mueller 提交者: Naoyuki Kanezawa

remove react-dom/lib/HTMLDOMPropertyConfig for better interop (#392)

上级 a8f58be4
import HTMLDOMPropertyConfig from 'react-dom/lib/HTMLDOMPropertyConfig'
const DEFAULT_TITLE = ''
const DOMAttributeNames = {
acceptCharset: 'accept-charset',
className: 'class',
htmlFor: 'for',
httpEquiv: 'http-equiv',
}
export default class HeadManager {
constructor () {
this.requestId = null
......@@ -68,7 +74,7 @@ function reactElementToDOM ({ type, props }) {
if (!props.hasOwnProperty(p)) continue
if (p === 'children' || p === 'dangerouslySetInnerHTML') continue
const attr = HTMLDOMPropertyConfig.DOMAttributeNames[p] || p.toLowerCase()
const attr = DOMAttributeNames[p] || p.toLowerCase()
el.setAttribute(attr, props[p])
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册