mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Special case crossOrigin for SVG image elements (#14832)
This commit is contained in:
1 parent
c6bee765ba
commit
fa6205d522
1 file changed
+12
-10
+12
-10
@@ -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
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user