mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
remove react-dom/lib/HTMLDOMPropertyConfig for better interop (#392)
This commit is contained in:
parent
a8f58be450
commit
422c631832
|
@ -1,7 +1,13 @@
|
|||
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])
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue