Open Bug 1959826 Opened 20 days ago Updated 8 days ago

SVG2: Reference entire files with <use>

Categories

(Core :: SVG, enhancement)

Firefox 137
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: jp, Unassigned)

References

Details

Attachments

(1 file)

Attached file test.html

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:

  1. Create a new HTML document
  2. In the HTML document, create a <svg> with a <use> with a href without a fragment
  3. Create an external SVG document
  4. 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.

Severity: -- → S3
Type: defect → enhancement
Duplicate of this bug: 1957894
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: