-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric Harrison wrote:
> No, that's not true.
What's not true? :)
> 1454 Element.addMethods = function(methods) {
> 1455 Object.extend(Element.Methods, methods || {});
>
> The first thing Element.addMethods() does (on line 1455) is extend
> Element.Methods with whatever methods you pass.
C'mon, we were talking about a different animal. :)
You are talking about extending "Element.Methods", while your assessment
was about the redundancy of extending "Element".
> On 11/29/06, Marius Feraru <[EMAIL PROTECTED]> wrote:
> Eric Harrison wrote:
>>>> I'm fairly certain that in Prototype 1.5.0_rc0 and up,
>>>> you just have to call Element.addMethods(). The
>>>> Object.extend(Element,Element.Methods); is redundant.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Not really, as you wont be able to use
> Element.foobar('element', ...)
> without it, only
> $('element').foobar(...)
> will be available.
> Extending an object (Element.Methods) twice is a lot of unnecessary
> overhead for JS.
Check the last line of prototype.js ;-)
cheers
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----
iD8DBQFFcRECtZHp/AYZiNkRAo7XAKCWrInXrlenhd1tmAs4C4D+RbBWxACZATck
nk3UTXjeqYvvD7WomIcY5i4=
=2b86
-----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---