Special case crossOrigin for SVG image elements (#14832)

This commit is contained in:
Brandon Dail authored and GitHub committed 2019-02-12 20:13:17 -08:00
1 parent c6bee765ba
commit fa6205d522
1 file changed
+12 -10
+12 -10
View File
@@ -525,13 +525,15 @@ const capitalize = token => token[1].toUpperCase();
);
});
// Special case: this attribute exists both in HTML and SVG.
// Its "tabindex" attribute name is case-sensitive in SVG so we can't just use
// its React `tabIndex` name, like we do for attributes that exist only in HTML.
properties.tabIndex = new PropertyInfoRecord(
'tabIndex',
STRING,
false, // mustUseProperty
'tabindex', // attributeName
null, // attributeNamespace
);
// These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
['tabIndex', 'crossOrigin'].forEach(attributeName => {
properties[attributeName] = new PropertyInfoRecord(
attributeName,
STRING,
false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
);
});