Re: Question about new DOM

Hi Jeff.

Jeff Schiller:
> I've been excited to hear more discussions about upgrading the DOM, I
> hope such discussions percolate up into DOM Core (particularly
> construction and mass-setting of attributes on elements).  Has there
> been any discussion about adding an innerSVG property [1] on all SVG
> elements?  I think such a property can be really handy for templating
> languages.

We didn’t discuss innerSVG during the week, no (although there is a
short section on http://www.w3.org/Graphics/SVG/WG/wiki/SVG_2_DOM for
it).  I agree something like that would be very handy.

AIUI, innerHTML is defined not to work on XML documents by HTML5.  I
wonder if there are any serious issues though in just making that work?
Making it actually do something sensible with

  var myGElement = …;
  myGElement.innerHTML = "<rect width=10 height=10 />";

might be tricky, though (with the HTML parser not being in the foreign
content mode when it encounters the <rect>).

I think it wouldn’t be so unreasonable to have an innerXML which does
XML parsing/serialisation (with some sort of definition about what
namespace default/prefixes are in scope).  I think there would be fewer
problems with having that apply to both HTML and XML documents than
innerHTML.

I guess it’s also worth thinking about whether to have that kind of
functionality up in DOM Core.  Anne, do you have any thoughts on that?

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Friday, 4 March 2011 23:06:31 UTC