This is definitely a FF issue.

Here's a reduced testcase without Prototype:

<html>
        <head>
                <script type="text/javascript">
                document.addEventListener('click', function() { throw
'foo' }, false);
                var event = document.createEvent('MouseEvents');
                event.initEvent('click', true, true);
                document.documentElement.dispatchEvent(event);
                </script>
        </head>
        <body>
        </body>
</html>

This should throw an error but doesn't in FF 3.5.1

On Aug 10, 6:30 pm, Tobie Langel <[email protected]> wrote:
> I'm correctly seeing ann exception thrown in:
>
> Safari 4.0.2
> FF 3.0.13
>
> However, it's no longer the case in FF 3.5.1.
>
> It seems that the issue isn't related to the dom:loaded event in
> particular, but to any fired custom event.
>
> Here's a reduced testcase:
>
> <html>
>         <head>
>                 <script type="text/javascript" src="http://
> prototypejs.org/assets/2009/6/16/prototype.js"></script>
>                 <script type="text/javascript">
>                 document.observe('foo:bar', function() { throw
> 'foo' });
>                 document.fire('foo:bar');
>                 </script>
>         </head>
>         <body>
>         </body>
> </html>
>
> Please open a bug report.
>
> Thanks,
>
> Tobie
>
> On Aug 10, 11:15 am, Nicolas Terray <[email protected]> wrote:
>
>
>
> > 2009/8/7 nlloyds <[email protected]>:
>
> > > On Aug 6, 4:32 pm, mr_justin <[email protected]> wrote:
> > >> Don't call a method on an element unless it exists. This is a basic
> > >> defensive coding technique.
>
> > > He gets this. His question is about why he does not receive an
> > > exception. I'm not sure, and now that I think about it, I may have had
> > > the same problem.
>
> > > Nicolas, have you tried your example with the latest RC of Prototype?
>
> > I've just tried with 1.6.1 RC3 and the behavior is the same. Should I
> > open a ticket or discuss about this bug on the core list?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to