This feature introduces support for the download attribute on the SVGAElement interface in Chromium, aligning with the SVG 2 specification. The download attribute enables authors to specify that the target of an SVG hyperlink should be downloaded rather than navigated to, mirroring the behavior already supported in HTMLAnchorElement. This enhancement promotes interoperability across major browsers and ensures consistent behavior between HTML and SVG link elements, thereby improving developer experience and user expectations.
Interoperability Risk: Low The download attribute on SVGAElement is currently supported in Firefox, with no known support in Safari/WebKit or other engines. The implementation is based on a well-defined behavior already supported in HTMLAnchorElement and formalized in the SVG 2 specification. Compatibility Risk: Very Low SVG links without the download attribute will continue to behave as they do today. For content that does use the attribute, the behavior will mirror that of HTML anchor elements, minimizing surprises and reducing the learning curve for developers. Overall, this change is expected to improve interoperability and developer experience with minimal risk to compatibility or stability.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
The implementation of the download attribute on SVGAElement builds upon Chromium’s existing anchor element infrastructure, ensuring consistent behavior and straightforward debugging. Developers can inspect and interact with the attribute using standard DevTools workflows.
While Web Platform Tests (WPT) are not suitable for validating actual file downloads—due to the limitations of sandboxed test environments and the inability to reliably assert file system interactions—we have instead added browser tests to verify the functionality. These browser-level tests simulate user interactions and confirm that the download behavior is correctly triggered and handled by the browser. This approach ensures accurate validation of the feature in a controlled environment, where download flows can be observed and asserted reliably.
Shipping on desktop | 142 |
Shipping on Android | 142 |
Shipping on WebView | 142 |
Shipping on iOS | 142 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None