SVG2: Reference entire files with <use>
Categories
(Core :: SVG, enhancement)
Tracking
()
People
(Reporter: jp, Unassigned)
References
Details
Attachments
(1 file)
539 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0
Steps to reproduce:
I attempted to use the <use>
element with an href
pointing to an entire SVG document.
According to the SVG 2 spec. (https://www.w3.org/TR/SVG2/struct.html#UseElementHrefAttribute):
New in SVG 2. An ‘href’ without a fragment allows an entire SVG document to be referenced without having to ensure that it has an ID on its root element.
To reproduce the bug:
- Create a new HTML document
- In the HTML document, create a
<svg>
with a<use>
with ahref
without a fragment - Create an external SVG document
- Notice the external SVG document referenced is missing in the HTML document
I've uploaded test.html, which includes a simple HTML document for testing. You can then add a test.svg
file in the same directory with these contents: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="30" /></svg>
.
Actual results:
When referencing an entire SVG document with <use>
, the referenced document is not loaded.
Expected results:
Referencing an entire SVG document with <use>
should correctly load the entire external document.
Reporter | ||
Comment 1•20 days ago
|
||
Related Chromium bug: https://issues.chromium.org/issues/40362369
Updated•16 days ago
|
Description
•