I’m stumped. Can anybody tell me why the following code won’t work in
IE?

var $ready = document.observe.curry('dom:loaded');

This code should – and does in other browsers – allow you to call:

$ready(function () {
    // do things on dom ready
});

…instead of…

document.observe('dom:loaded', function () {
    // do things on dom ready
});

I use dom:loaded a lot in my code, and so was looking for a quicker
way of typing it. Obviously, I could do the Lowpro-style:

var $ready = function (fn) {
    document.observe('dom:loaded', fn);
}

but I think .curry is a much more elegant method.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to