Re: Load Div In Foreign Object Element

Mark T <[email protected]> Thu, 20 Mar 2014 18:01:21 +1100
Newsgroups gmane.text.xml.svg.devel
Message-ID <CAKjw9EZnqJMY6iNijn66D03=evOXDMTmGnr_t_jWn3GDHAa=Zw@mail.gmail.com>
Hi James,
This is proving elusive to me.
The theory would be to parse text/xml containing xhtml within a svg
document.
Then attach this to a foreignObject.
This is as far as I get:
http://govirtual.com.au/Tests/TestFOdynamicAddText.svg

There may be a security restriction imposed by the parser.
Content is being discarded.
The rules for this will be found .somewhere.
I recall there being a bug raised "Why don't we have an xhtml parser?"

* "Does document.write work in XHTML?No. Because of the way XML is defined,
it is not possible to do tricks like this, where markup is generated by
scripting while the parser is still parsing the markup.You can still
achieve the same effects, but you have to do it by using the DOM to add and
delete elements."

There will be an explain in the browser source code .somewhere.

MarkT

On Thu, Mar 20, 2014 at 11:44 AM, <[email protected]> wrote:

>  I am at the last stage of publishing what I think is a helpful SVG demo.
> The last thing I need to do is load through script a div that is in a
> foreign object element. I am assuming this is possible by first getting the
> foreign object element and then finding the display element inside it, but
> I don't know how to do this.
>