On Tue, Apr 29, 2008 at 1:04 PM, Jean-Paul Calderone <[EMAIL PROTECTED]>
wrote:

> 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.
>

Thanks for your reply Jean-Paul,

Yep, on Firefox I too see 59 tests succeed. With IE on Vista, 58. (Although
I don't _think_ it's to do with the current problem -

Nevow.Athena.Tests.DynamicWidgetInstantiation.test_nonXHTMLWidgetReturn

Failed to discover node with id value athena:52 beneath [object]
(programmer error).
undefined

Nevow.Athena.Tests.DynamicWidgetInstantiation.test_invalidRemoveChildWidget
(not sure which one of the tests the err msg relates to) .)

Unfortunately, our Corporate Standard is IE, and we're going from W2000 to
Vista for 70K users soon :-(


Anyway - might IE's failure with 'onbeforeunload' explain why I'm having
trouble refreshing an Athena page? (Because the server doesn't get any
sendCloseMessage() ?)


Hmm.. we can't be alone in the world using IE, or M$ wouldn't be so big...
:-)

Regards,
Harald
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to