Jim said:
yet, it's near impossible to do version detection of javascript...
Ah, but I assume that detecting JScript wouldn't be too hard, using
conditional compilation and VBArrays...or not?
Nope, my proposal (which you can see in the www-svg archives) would be
for a delayed dispatchEvent. Although even the current SVG 1.2
proposal I welcome as better than setTimeout, which really is lousy.
When reading your first answer I was about to exemplify good uses for
setTimeout (other than addressing browser lack of support for events),
but the more I think to that delayed dispatchEvent, the more valid it
seems to be.
I'm not familiar with SVG yet, scanning the SVG1.2 draft yielded the
SVGRunnable and SVGTimer interfaces, do you really prefer this over
setTimeout?
I mean, it's possible to implement elegant components using setTimeout,
and to me the spec is just proposing an interface to such a component,
which, though IMHO quite correct, remains easily done with javascript
and setTimeout, and seems moreover to be missing the spirit of an
events-based system.
At least setTimeout is much more fun
, and it being easy to use means
more flexibility for the programmer - I don't see any real added value
or innovation in the SVG two interfaces.
As for the "sleep" method, I hate the idea - that'd split the execution
context, so that would deal with javascript, while the timeout only
deals with the host, much neater.
Cheers,
Yep.