SVG.

This specification is an experimental breakup of the HTML specification. You can see the full list on the index page and take part in the discussion in the repository.

SVG

The svg element from the SVG namespace falls into the embedded content, phrasing content, and flow content categories for the purposes of the content models in this specification.

To enable authors to use SVG tools that only accept SVG in its XML form, interactive HTML user agents are encouraged to provide a way to export any SVG fragment as an XML namespace-well-formed XML fragment.

When the SVG foreignObject element contains elements from the HTML namespace, such elements must all be flow content. [[!SVG]]

The content model for title elements in the SVG namespace inside HTML documents is phrasing content. (This further constrains the requirements given in the SVG specification.)

The semantics of SVG elements are defined by the SVG specification and other applicable specifications. [[!SVG]]


doc = iframe . getSVGDocument()
doc = embed . getSVGDocument()
doc = object . getSVGDocument()

Returns the Document object, in the case of iframe, embed, or object elements being used to embed SVG images.

The getSVGDocument() method must run the following steps:

  1. If the element has no nested browsing context, then return null and abort these steps.

  2. If the active document of the nested browsing context does not have the same effective script origin as the element's node document, then return null and abort these steps.

  3. If the nested browsing context's active document was created by the page load processing model for XML files section because the sniffed type of the resource in the navigate algorithm was image/svg+xml, then return that Document object and abort these steps.

  4. Otherwise, return null.