On the topic of GWT initialization

Ideally SVG ought to be embedded as a subtree inside an xhtml document, or be linked in an html document through an <a href=”my.svg”> tag. GWT would provide the logic to make these graphics dynamic…

However GWT initialization today is tightly linked to HTML and depends on a  procedure involving iframes to bootstrap the process. This means you cannot currently use GWT code in another container than html. Too bad. If GWT code could live in other, javascript enabled containers (xhtml, svg, web workers), it would greatly broaden its potential.

The most thorough analysis (and even prototyping) of a generalized and open bootstrap process has been made by Archie Cobbs but alas it has not seemed to raise all the attention it deserves from the GWT team.

2 comments to On the topic of GWT initialization

  • Parsh

    How is this achieved? SVG can be rendered to browsers as .XHTML or .XML. How is this library able to render SVG to HTML?

    Unrelated not how about a simple down-loadable example to start using the jar like a tutorial? Are other examples found here down-loadable?


  • admin

    It is better to use the newsgroup to discuss such topics (lib-gwt-svg@googlegroups.com).
    With regards to the way the library works, it uses the fact that browser engines are capable of instantiating SVG elements from javascript (using document.createElementNS and DOMParser.parse), even though they are not able to parse them when they are embedded without namespace in an HTML document.
    However even that is changing with FF4 and IE9, which now have a parser which lets you embed SVG markup in your HTML5 markup (you just need to begin your document with the HTML5 doctype).

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>