- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Sun, 05 Feb 2006 15:27:11 -0600
- To: Maciej Stachowiak <mjs@apple.com>
- CC: Jonathan Watt <jwatt@jwatt.org>, www-svg@w3.org
Maciej Stachowiak wrote: > Mozilla already had to solve this problem for XMLHttpRequest, which has > methods with optional arguments on e.g. the open() method. What approach > did you guys take? Defining the open() method to take no arguments at all in the IDL, then manually looking at the JS callstack in the C++ implementation to get the argument. Similar for window.open() and a few other DOM0 things. Note that this means that effectively the use of open() is restricted to a single language binding (JS to be exact). There is a separate method, not exposed to JS and named openRequest, that can be used from other languages. That method does not have optional arguments. I really doubt that this is a desirable approach for SVG, though... The only reason we did it for XMLHttpRequest is because we were in the position of having to emulate IE's behavior. -Boris
Received on Sunday, 5 February 2006 21:27:16 UTC