On Tue, 29 Apr 2008 12:39:16 +0200, Harald Blåtand <[EMAIL PROTECTED]> wrote:
Hi,
I'm using Nevow 0.9.31. Have been struggling with catching the
onbeforeunload event for a couple of days. From the JS code in
Athena/__init__.js, it looks like the events 'onkeypress' and
'onbeforeunload' are handled pretty automatically; and by adding alerts to
their methods, I can verify that both are caught fine on Firefox.
However, on Internet Explorer - v 6.0.2800 on W2000, and 7.0.6000 on Vista
- neither of these 2 events is trapped.
Does anybody know whether this is a known problem with Athena on IE?
I'm not sure what might be going on here. I can tell you that I've never
tested Athena on either of those platforms, though.
(A further observation - the Athena test files TestInit.js and TestWidget.js
both appear to have tests for onbeforeunload. Now, when I do 'nit
--port=9876 nevow' and press "Run Tests" in the browser, these files do not
seem to run. I don't understand too much of the interactive unit tests yet,
but I get a feeling that file livetest_athena.py would need to have a line
like "jsClass = u'Nevow.Test.." for these 2 files to be found and executed,
and it doesn't.)
When I run `nit nevow´ and click the `Run Tests´ button, I see 59 tests
run and succeed. This using Firefox 1.5 on Ubuntu 6.06.
You might be confusing nits with JavaScript unit tests. nits are defined
by livetest_*.py files and whatever JavaScript the `jsClass´ attributes in
them point to. Much (perhaps not, there's a bit of mixing) of the code in
the Nevow.Test JavaScript package (defined by Nevow/nevow/js/Nevow/Test/)
is for JavaScript unit tests. These are run using the stand-alone spider-
monkey interpreter; they don't run in a browser.
Nevow/nevow/js/Nevow/Athena/Tests/__init__.js has most of the code for the
Nevow nits.
Jean-Paul
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web