-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<template> element capability/semantics in SVG parsing context #3563
Comments
The original discussions of the
It wasn't immediately clear to this lay person what would necessitate a hard-coded list of SVG elements; it seems like if the parser is parsing in the SVG namespace and there was a |
What you are suggesting is effectively introducing a new element with equivalent semantics to the If instead the suggestion is changed to make it create an HTML I do think it would be good to figure out something here as SVG is very much part of the platform and it's rather crappy for templates to not support it properly, but it's probably better at this point to take a couple steps back and focus on high-level use cases and requirements first (and perhaps a survey of what frameworks have on offer). |
And my very next comment #919 (comment) complains about Henri's comment as being discussion-stopping, and provides a solution to fix things. ^_^ (Add a new HTML |
I think that has the same issues he's worried about. Namely that introducing new ways to create elements has security implications and even if all browsers updated it's unclear if servers would. |
This is a feature request to provide similar capability/semantics of the
HTMLTemplateElement
/<template>
tag for elements parsed in the SVG namespace.From a user's point of view, the use cases and reasons that made
<template>
useful -- ability to parse a prototypical chunk of elements from a document, holding the parsed nodes in an inert fragment, and ability to efficiently clone one or more instances of the template without incurring re-parsing costs or needing to recursively walk a tree to create them -- all apply to elements in the SVG context. However, the<template>
tag is only defined in the HTML namespace, and there is no built-in equivalent for SVG.This seems like an obvious hole in the platform; what are the current blockers to considering such an addition?
The text was updated successfully, but these errors were encountered: