11
11
var UNKNOWN_MESSAGE = 'Unknown property \'{{name}}\' found, use \'{{standardName}}\' instead' ;
12
12
13
13
var DOM_ATTRIBUTE_NAMES = {
14
+ // Standard
14
15
'accept-charset' : 'acceptCharset' ,
15
16
class : 'className' ,
16
17
for : 'htmlFor' ,
17
- 'http-equiv' : 'httpEquiv'
18
+ 'http-equiv' : 'httpEquiv' ,
19
+ // SVG
20
+ 'clip-path' : 'clipPath' ,
21
+ 'fill-opacity' : 'fillOpacity' ,
22
+ 'font-family' : 'fontFamily' ,
23
+ 'font-size' : 'fontSize' ,
24
+ 'marker-end' : 'markerEnd' ,
25
+ 'marker-mid' : 'markerMid' ,
26
+ 'marker-start' : 'markerStart' ,
27
+ 'stop-color' : 'stopColor' ,
28
+ 'stop-opacity' : 'stopOpacity' ,
29
+ 'stroke-dasharray' : 'strokeDasharray' ,
30
+ 'stroke-linecap' : 'strokeLinecap' ,
31
+ 'stroke-opacity' : 'strokeOpacity' ,
32
+ 'stroke-width' : 'strokeWidth' ,
33
+ 'text-anchor' : 'textAnchor' ,
34
+ 'xlink:actuate' : 'xlinkActuate' ,
35
+ 'xlink:arcrole' : 'xlinkArcrole' ,
36
+ 'xlink:href' : 'xlinkHref' ,
37
+ 'xlink:role' : 'xlinkRole' ,
38
+ 'xlink:show' : 'xlinkShow' ,
39
+ 'xlink:title' : 'xlinkTitle' ,
40
+ 'xlink:type' : 'xlinkType' ,
41
+ 'xml:base' : 'xmlBase' ,
42
+ 'xml:lang' : 'xmlLang' ,
43
+ 'xml:space' : 'xmlSpace'
18
44
} ;
19
45
20
46
var DOM_PROPERTY_NAMES = [
@@ -32,17 +58,7 @@ var DOM_PROPERTY_NAMES = [
32
58
// Non standard
33
59
'autoCapitalize' , 'autoCorrect' ,
34
60
'autoSave' ,
35
- 'itemProp' , 'itemScope' , 'itemType' , 'itemRef' , 'itemID' ,
36
- // SVG
37
- 'clipPath' , 'cx' , 'cy' , 'd' , 'dx' , 'dy' , 'fill' , 'fillOpacity' , 'fontFamily' ,
38
- 'fontSize' , 'fx' , 'fy' , 'gradientTransform' , 'gradientUnits' , 'markerEnd' ,
39
- 'markerMid' , 'markerStart' , 'offset' , 'opacity' , 'patternContentUnits' ,
40
- 'patternUnits' , 'points' , 'preserveAspectRatio' , 'r' , 'rx' , 'ry' , 'spreadMethod' ,
41
- 'stopColor' , 'stopOpacity' , 'stroke' , 'strokeDasharray' , 'strokeLinecap' ,
42
- 'strokeOpacity' , 'strokeWidth' , 'textAnchor' , 'transform' , 'version' ,
43
- 'viewBox' , 'x1' , 'x2' , 'x' , 'y1' , 'y2' , 'y' ,
44
- 'xlink:Actuate' , 'xlink:Arcrole' , 'xlink:Href' , 'xlink:Role' , 'xlink:Show' , 'xlink:Title' , 'xlink:Type' ,
45
- 'xml:Base' , 'xml:Lang' , 'xml:Space'
61
+ 'itemProp' , 'itemScope' , 'itemType' , 'itemRef' , 'itemID'
46
62
] ;
47
63
48
64
// ------------------------------------------------------------------------------
@@ -83,7 +99,7 @@ function getStandardName(name) {
83
99
i = index ;
84
100
return element . toLowerCase ( ) === name ;
85
101
} ) ;
86
- return found ? DOM_PROPERTY_NAMES [ i ] . replace ( ':' , '' ) : null ;
102
+ return found ? DOM_PROPERTY_NAMES [ i ] : null ;
87
103
}
88
104
89
105
// ------------------------------------------------------------------------------
0 commit comments