@@ -29,6 +29,9 @@ const DOM_ATTRIBUTE_NAMES = {
29
29
const ATTRIBUTE_TAGS_MAP = {
30
30
// image is required for SVG support, all other tags are HTML.
31
31
crossOrigin : [ 'script' , 'img' , 'video' , 'audio' , 'link' , 'image' ] ,
32
+ fill : [ 'svg' ] ,
33
+ property : [ 'meta' ] ,
34
+ viewBox : [ 'svg' ] ,
32
35
} ;
33
36
34
37
const SVGDOM_ATTRIBUTE_NAMES = {
@@ -130,8 +133,22 @@ const DOM_PROPERTY_NAMES_ONE_WORD = [
130
133
'name' , 'open' , 'optimum' , 'pattern' , 'ping' , 'placeholder' , 'poster' , 'preload' , 'profile' ,
131
134
'rel' , 'required' , 'reversed' , 'role' , 'rows' , 'sandbox' , 'scope' , 'selected' , 'shape' , 'size' , 'sizes' ,
132
135
'span' , 'src' , 'start' , 'step' , 'target' , 'type' , 'value' , 'width' , 'wrap' ,
136
+ // SVG attributes
137
+ // See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
138
+ 'accumulate' , 'additive' , 'alphabetic' , 'amplitude' , 'ascent' , 'azimuth' , 'bbox' , 'begin' ,
139
+ 'bias' , 'by' , 'clip' , 'color' , 'cursor' , 'cx' , 'cy' , 'd' , 'decelerate' , 'descent' , 'direction' ,
140
+ 'display' , 'divisor' , 'dur' , 'dx' , 'dy' , 'elevation' , 'end' , 'exponent' , 'fill' , 'filter' ,
141
+ 'format' , 'from' , 'fr' , 'fx' , 'fy' , 'g1' , 'g2' , 'hanging' , 'height' , 'hreflang' , 'ideographic' ,
142
+ 'in' , 'in2' , 'intercept' , 'k' , 'k1' , 'k2' , 'k3' , 'k4' , 'kerning' , 'local' , 'mask' , 'mode' ,
143
+ 'offset' , 'opacity' , 'operator' , 'order' , 'orient' , 'orientation' , 'origin' , 'overflow' , 'path' ,
144
+ 'ping' , 'points' , 'r' , 'radius' , 'rel' , 'restart' , 'result' , 'rotate' , 'rx' , 'ry' , 'scale' ,
145
+ 'seed' , 'slope' , 'spacing' , 'speed' , 'stemh' , 'stemv' , 'string' , 'stroke' , 'to' , 'transform' ,
146
+ 'u1' , 'u2' , 'unicode' , 'values' , 'version' , 'visibility' , 'widths' , 'x' , 'x1' , 'x2' , 'xmlns' ,
147
+ 'y' , 'y1' , 'y2' , 'z' ,
148
+ // OpenGraph meta tag attributes
149
+ 'property' ,
133
150
// React specific attributes
134
- 'ref' ,
151
+ 'ref' , 'key' ,
135
152
] ;
136
153
137
154
const DOM_PROPERTY_NAMES_TWO_WORDS = [
@@ -152,6 +169,36 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [
152
169
'onDragStart' , 'onDrop' , 'onMouseDown' , 'onMouseEnter' , 'onMouseLeave' , 'onMouseMove' , 'onMouseOut' , 'onMouseOver' ,
153
170
'onMouseUp' , 'onPaste' , 'onScroll' , 'onSelect' , 'onSubmit' , 'onTransitionEnd' , 'radioGroup' , 'readOnly' , 'referrerPolicy' ,
154
171
'rowSpan' , 'srcDoc' , 'srcLang' , 'srcSet' , 'useMap' ,
172
+ // SVG attributes
173
+ // See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
174
+ 'crossOrigin' , 'accentHeight' , 'alignmentBaseline' , 'arabicForm' , 'attributeName' ,
175
+ 'attributeType' , 'baseFrequency' , 'baselineShift' , 'baseProfile' , 'calcMode' , 'capHeight' ,
176
+ 'clipPathUnits' , 'clipPath' , 'clipRule' , 'colorInterpolation' , 'colorInterpolationFilters' ,
177
+ 'colorProfile' , 'colorRendering' , 'contentScriptType' , 'contentStyleType' , 'diffuseConstant' ,
178
+ 'dominantBaseline' , 'edgeMode' , 'enableBackground' , 'fillOpacity' , 'fillRule' , 'filterRes' ,
179
+ 'filterUnits' , 'floodColor' , 'floodOpacity' , 'fontFamily' , 'fontSize' , 'fontSizeAdjust' ,
180
+ 'fontStretch' , 'fontStyle' , 'fontVariant' , 'fontWeight' , 'glyphName' ,
181
+ 'glyphOrientationHorizontal' , 'glyphOrientationVertical' , 'glyphRef' , 'gradientTransform' ,
182
+ 'gradientUnits' , 'horizAdvX' , 'horizOriginX' , 'imageRendering' , 'kernelMatrix' ,
183
+ 'kernelUnitLength' , 'keyPoints' , 'keySplines' , 'keyTimes' , 'lengthAdjust' , 'letterSpacing' ,
184
+ 'lightingColor' , 'limitingConeAngle' , 'markerEnd' , 'markerMid' , 'markerStart' , 'markerHeight' ,
185
+ 'markerUnits' , 'markerWidth' , 'maskContentUnits' , 'maskUnits' , 'mathematical' , 'numOctaves' ,
186
+ 'overlinePosition' , 'overlineThickness' , 'panose1' , 'paintOrder' , 'pathLength' ,
187
+ 'patternContentUnits' , 'patternTransform' , 'patternUnits' , 'pointerEvents' , 'pointsAtX' ,
188
+ 'pointsAtY' , 'pointsAtZ' , 'preserveAlpha' , 'preserveAspectRatio' , 'primitiveUnits' ,
189
+ 'referrerPolicy' , 'refX' , 'refY' , 'rendering-intent' , 'repeatCount' , 'repeatDur' ,
190
+ 'requiredExtensions' , 'requiredFeatures' , 'shapeRendering' , 'specularConstant' ,
191
+ 'specularExponent' , 'spreadMethod' , 'startOffset' , 'stdDeviation' , 'stitchTiles' , 'stopColor' ,
192
+ 'stopOpacity' , 'strikethroughPosition' , 'strikethroughThickness' , 'strokeDasharray' ,
193
+ 'strokeDashoffset' , 'strokeLinecap' , 'strokeLinejoin' , 'strokeMiterlimit' , 'strokeOpacity' ,
194
+ 'strokeWidth' , 'surfaceScale' , 'systemLanguage' , 'tableValues' , 'targetX' , 'targetY' ,
195
+ 'textAnchor' , 'textDecoration' , 'textRendering' , 'textLength' , 'transformOrigin' ,
196
+ 'underlinePosition' , 'underlineThickness' , 'unicodeBidi' , 'unicodeRange' , 'unitsPerEm' ,
197
+ 'vAlphabetic' , 'vHanging' , 'vIdeographic' , 'vMathematical' , 'vectorEffect' , 'vertAdvY' ,
198
+ 'vertOriginX' , 'vertOriginY' , 'viewBox' , 'viewTarget' , 'wordSpacing' , 'writingMode' , 'xHeight' ,
199
+ 'xChannelSelector' , 'xlinkActuate' , 'xlinkArcrole' , 'xlinkHref' , 'xlinkRole' , 'xlinkShow' ,
200
+ 'xlinkTitle' , 'xlinkType' , 'xmlBase' , 'xmlLang' , 'xmlnsXlink' , 'xmlSpace' , 'yChannelSelector' ,
201
+ 'zoomAndPan' ,
155
202
// Safari/Apple specific, no listing available
156
203
'autoCorrect' , // https://stackoverflow.com/questions/47985384/html-autocorrect-for-text-input-is-not-working
157
204
'autoSave' , // https://stackoverflow.com/questions/25456396/what-is-autosave-attribute-supposed-to-do-how-do-i-use-it
0 commit comments