Yes, this has been fixed on 1.3 since beta1.
You can fix it by doing this:
Element.Properties.type = {
get: function(){
return this.type;
},
set: funciton(value){
this.setAttribute('type', value);
return this;
}
};
Then use $(el).get('type');
And it should work.
Check more deatails here:
https://mootools.lighthouseapp.com/projects/2706/tickets/747-setgetremove-property-bugs
As you can see it's marked as solved.
--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces
Twitter: fabiomiranda
http://solucione.info
On Wed, Jun 30, 2010 at 4:53 AM, vitotafuni <[email protected]> wrote:
> i'm working with strophe.js to make an XMPP client
> but when I receive an iq stanzas (an xml dom object with properties
> like 'to','from','type')
> i can't read the type property
>
> call_on_evt: functiin(iq){
> var el=$(iq);
> alert(el.get('type'));
> }
>
> give me an undefined value.
>
>
> the problem seems related to the code of Element.getProperty
>
> getProperty: function(attribute){
> var key = attributes[attribute];
> var value = (key) ? this[key] : this.getAttribute(attribute,
> 2);
> return (bools[attribute]) ? !!value : (key) ? value : value
> || null;
> }
>
> the first returned attribute value is one of the internal attributes
> array... i don't understand very well why.
>
> is there someone who can point me to the right solution or confirm the
> problem in the library??
>
> -Vito-
>