Re: Comments on SVG 1.2 from a Gecko developer

Robert O'Callahan wrote:

>>> Javascript might not be a problem, but for other binding languages, 
>>> such as Java, putting (say) a socket API in the SVGWindow interface 
>>> means that people are going to write programs whose text demands that 
>>> there is a socket API in SVG. That's bad.

> Peter Sorotokin wrote:

>> Why??? Besides all APIs must be language-neutral, so if it is 
>> available in JavaScript, it is available in Java as well.
> Sure. I guess I'm being unclear. Here's what I'm talking about:
> Javascript:
>    var s = document.window.createConnection();
> Java:
>    DOMWindow w = document.getWindow();
>    SVGWindow w2 = (SVGWindow)w;
>    Connection c = w2.createConnection();
> You can move createConnection() to a WebAppWindow interface without 
> breaking the Javascript program, but it will break the Java program.

   You can rebase SVGWindow so it implements WebAppWindow and the Java
code will continue to work.  C++ is another matter, but any change to
any header and you generally have to rebuild everything (although
you can still preserve code compatibility by rebasing SVGWindow).

Received on Thursday, 8 July 2004 16:01:07 UTC