If that doesn't work, then you've done something wrong somewhere.
'Cause it works for IE for me and everyone else.

The only advantage I see with the YUI toolkit is that it'll defer
attaching events to elements that do not yet exist in the DOM.  Big
whoop, only a sloppy programmer would try to attach an event to a
non-existant element.  With Prototype, you can bind the handler function
to an object of your choice and create your own scope.  I didn't see
that option on the YUI documentation I read. (it automatically binds the
scope to the element the event acted upon, which is pretty much never
what I want).

Greg

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:rails-spinoffs-
> [EMAIL PROTECTED] On Behalf Of Sam Rowe
> Sent: Thursday, June 15, 2006 12:18 PM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: Re: [Rails-spinoffs] Yahoo!-like Event object
> emulation/abstractioninPrototype?
> 
> On Thu, Jun 15, 2006 at 11:28:03AM -0600, Gregory Hill wrote:
> # Event.observe(myelement, 'click', myfunc.bindAsEventListener());
> #
> # That might fix your wagon.
> 
> That didn't seem to make any difference. FF still works, IE still
> does not. I'm not branching for window.event in my callback/listener.
> 
> I'm asking about a level of abstraction/emulation like is described
> in the section titled "It's Tight because..."
> 
> http://www.dustindiaz.com/yahoo-event-utility/
> 
> Any chance of getting that in Prototype?
> 
> #
> # Greg
> #
> # > -----Original Message-----
> # > From: [EMAIL PROTECTED]
> # [mailto:rails-spinoffs-
> # > [EMAIL PROTECTED] On Behalf Of Sam Rowe
> # > Sent: Thursday, June 15, 2006 11:24 AM
> # > To: rails-spinoffs@lists.rubyonrails.org
> # > Subject: Re: [Rails-spinoffs] Yahoo!-like Event object
> # > emulation/abstractionin Prototype?
> # >
> # > On Thu, Jun 15, 2006 at 08:44:13AM -0500, Ryan Gahl wrote:
> # > #    Um... Event.observe() -- it's been there all along and does
that
> # > #    abstraction.
> # >
> # > Weird, I wonder why none of my event handlers work in IE. I'll
look
> # > closer.
> # > Thanks for the info.
> # >
> # > Just cause I'm dense... I'm talking about this:
> # >
> # > Event.observe(myelement,'click',myfunc);
> # >
> # > function myfunc(e){
> # >     // deal with e like I would in FF
> # > }
> # >
> # > Are we talking about the same thing?
> # > _______________________________________________
> # > Rails-spinoffs mailing list
> # > Rails-spinoffs@lists.rubyonrails.org
> # > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> # _______________________________________________
> # Rails-spinoffs mailing list
> # Rails-spinoffs@lists.rubyonrails.org
> # http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to