Re: Does SVG 1.0 define this? (non-<svg> root element)

On Mon 14 Jun 2004, Ian Hickson wrote:

> 
> On Mon, 14 Jun 2004, Dean Jackson wrote:
> >>
> >> Would you say this extended to the DOM interfaces too? That is, if I
> >> create an SVG element, does it have SVG interfaces if it is not in an SVG
> >> context?
> >
> > Well, this is a really tough one. I don't think this is defined in any
> > spec, but I say "it depends".
> >
> > As you know, in SVG we don't expect any non-SVG elements to have their
> > native DOM interfaces. The exception are elements in a <foreignObject>
> > when you are in a processor that implements the foreign namespace's
> > native DOM.
> 
> That can't work though. If I create an html:div element, it has an
> HTMLDivElement interface immediately. If I then insert it as the child of
> an <svg:svg> element, it can't lose that interface. That would make no
> sense.

I've caved on this elsewhere - I might as well do it 
in public :)

You're right. The interface should never change, so 
in this case the HTML DOM must be used for HTML elements
(if the UA groks HTML DOM).

Dean

Received on Tuesday, 13 July 2004 20:08:58 UTC