xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <...@mcc.id.au>
Subject Re: Loading a new document from script
Date Thu, 23 Oct 2008 06:13:35 GMT
Hi G. Wade.

G. Wade Johnson:
> I know I should know the answer to this. I'd swear I've done it
> before.
>
> How can I replace the current SVG document in Batik with JavaScript?
>
> The method I used in the browsers (window.location.replace( new_url ))
> does not work on Squiggle (versions 1.6 or 1.7).

Recent changes to SVG Tiny 1.2 include a subset of Window which would
allow the above call to location.replace().  But no, it’s not
implemented in Batik yet.

> I get the error:
> 
>     TypeError: Cannot call method "replace" of undefined
> 
> Obviously 'window.location' doesn't exist.
> 
> I have tried looking around the properties of both document and
> window. The document object has some methods that looked promising,
> but none appear to do what I need.

I don’t believe there is a way to do this from within script at the
moment, actually.  I filed a bug to implement window.location, just as a
note that it’s probably an easy thing to do, when I (or someone else)
gets some time:

  https://issues.apache.org/bugzilla/show_bug.cgi?id=46072

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message