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: suspendRedraw(), unsuspendRedraw()
Date Wed, 07 Jun 2006 04:03:25 GMT
Hi Andreas.

Andreas Neumann:
> is there any clean way to test per ECMAScript whether a DOM method is 
> present and implemented?
> 
> In my case "alert(document.documentElement.suspendRedraw)" returns true, 
> but I can't see if it is actually working.

Yeah, just testing that the method exists is insufficient.  And the
reason all of the methods exist, is that otherwise the Java objects that
implement them would not have implemented the whole Java SVG interface
files.

> My problem is that some browsers implement suspendRedraw and others 
> don't and I have to test if the method is available.
> 
> I tried with try/catch but it did not work either.

Yeah, it’s not ideal that those methods are throwing Errors instead of
some other RuntimeException.  I’ve just made a change in SVN for them to
throw UnsupportedOperationExceptions instead, which makes them
capturable from script.

This probably doesn’t help you, however, if you want to support any
older version of Batik.  I don’t think there’s a reasonable way of
sniffing the Batik version, either.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@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