-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ionut Cioflan wrote:
> Object.extend(Element, {
> getWidth: function(element) {
> [...]
> });
> Questions:
> 1. Have I done something wrong or the extend function doesn't working
> properly ?
> 2. Why aren't these functions added by default to Element (only
> getHeight() exists) ?
This is the proper way to add your own methods:
Element.addMethods({
[your methods here]
});
Object.extend(Element, Element.Methods);
Element.addMethods();
cheers
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----
iD8DBQFFbOOAtZHp/AYZiNkRAqYJAKCqsuakBO3vVZOB7KUSWRxACsuLyACfaz+H
oSz4NKvkaHgTgvfBqzLq7rs=
=LkzL
-----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
-~----------~----~----~----~------~----~------~--~---