Support crossorigin attribute on SVG elements
Categories
(Core :: SVG, enhancement)
Tracking
()
People
(Reporter: xidorn, Unassigned)
Details
It seems to me that crossorigin
attribute is not supported on SVG elements like <image>
.
This is part of the SVG 2.0 spec: https://svgwg.org/svg2-draft/embedded.html#ImageElementCrossoriginAttribute
Chrome seems to support it. Also it seems that Chrome's support is probably case-insensitive, that both crossorigin
and crossOrigin
seem to be working.
If that disagree with the spec, we may want to change the spec, because React would generate crossOrigin
even for SVG, and they refused to change that because HTML attributes are case-insensitive, and that saves runtime work for it. See facebook/react#14216.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
So, the statement that Chrome handles it case-insensitively is wrong. Chrome lower-cases the attribute name during parsing. However, if the attribute is added via setAttribute
, it will be case-sensitive, and crossOrigin
is not going to work, as I mentioned in the React bug.
Description
•