W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

template namespace attribute proposal

From: Benjamin Lesh <blesh@netflix.com>
Date: Wed, 11 Mar 2015 20:32:20 -0700
Message-ID: <CADcN1GABeCX_qeNXboFUzMUQ3TCHjUOH=kd5081BsbEF0FyQ7g@mail.gmail.com>
To: public-webapps@w3.org
I'd like to propose that the <template> tag have a namespace="" attribute
that allows the user to specify namespaces such as "
http://www.w3.org/2000/svg", so that the document fragment that comes from
`.content` is created properly.


<template id="my-svg-template" namespace="http://www.w3.org/2000/svg>
  <circle cx="10" cy="10" cr="10"/>

Likewise, <content> should work properly inside of that template tag, but I
suspect that's more of a proposal for the SVG spec.

This proposal comes from work I'm doing at Netflix to create composable
graph components that are SVG based. Currently, I'm not able to use
<template> tags efficiently.  This proposal seems like something that would
be good in the long run, and something that would also be easy to polyfill
in the meantime.

What are your thoughts on this idea?

Thank you,

Ben Lesh
Senior UI Engineer
Received on Thursday, 12 March 2015 09:37:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:44 UTC