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:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
