You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the HTML parser does not recognize these tagnames within an SVG subtree to be HTML-namespaced elements, although this may change in the future. Therefore, in order to include these elements within your SVG, you must either use an XML serialization that recognizes namespace declarations (such as stand-alone SVG or XHTML), or you must create namespaced elements via the createElementNS DOM API method. Alternatively, you can use the foreignObject element to wrap the HTML-namespaced elements; the HTML parser correctly parses HTML elements within a foreignObject.
Is it possible to adjust the HTML parser so that these elements and their children end up in the HTML namespace?
i.e.
<html><!-- HTML namespace --><svg><!-- SVG namespace --><iframe><!-- HTML namespace --><p><!-- HTML namespace --></iframe><g></g><!-- SVG namespace --></svg></html>
None of these elements are in the list of elements that trigger auto-escaping from SVG (see rules for parsing tokens in foreign content) so I think we're fine from that point of view.
This seems to be much more conservative than any of the things we discussed in the past. (Although I do wonder where we're at with <template> and whether or not we should do something about it at the same time.)
In SVG 2's section on HTML elements in SVG subtrees has the comment,
Is it possible to adjust the HTML parser so that these elements and their children end up in the HTML namespace?
i.e.
None of these elements are in the list of elements that trigger auto-escaping from SVG (see rules for parsing tokens in foreign content) so I think we're fine from that point of view.
This seems to be much more conservative than any of the things we discussed in the past. (Although I do wonder where we're at with
<template>
and whether or not we should do something about it at the same time.)@annevk ?
CC: @nikosandronikos @satakagi @AmeliaBR @heycam
The text was updated successfully, but these errors were encountered: