Hi there,

  after making work some code for Safari, Firefox and Opera it was
time to invite "party pooper" IE to the party.

  After a while understanding myself and the Microsoft IE script
debugger this bug IE "reports" was found. All was hasAttribute
related.

  With a little use of the console I was able to see that the element
that the code was "talking" to was already extended as expected but IE
still complains.

  Found that in IE 6 (I didn't test this other versions yet)
hasAttribute returns correctly true when the given attribute is found
in the element but it returns null in case it don't which is
inconsistent. I don't know if this is a bug or a feature but given
that all other browsers returns false as expected for that case I
propose replace this:

"...
Element.Methods.Simulated = {
  hasAttribute: function(element, attribute) {
    var t = Element._attributeTranslations, node;
    attribute = t.names[attribute] || attribute;
    node = $(element).getAttributeNode(attribute);
    return node && node.specified;
  }
};
..."


with this:
"...
Element.Methods.Simulated = {
  hasAttribute: function(element, attribute) {
    var t = Element._attributeTranslations, node;
    attribute = t.names[attribute] || attribute;
    node = $(element).getAttributeNode(attribute);
    if(!node){return false}
    else{return node && node.specified};
  }
};
..."

because with that it seems to behave.

The other issue I've found is related to the extension of elements
with empty id. I found that IE considers obscene to extend a div which
has no id (collected using getElementsByTagName('div')). Other
browsers seems to behave. Is desirable that one can give an
homogeneous treatment to this creatures (elements I mean) so I will
workarround it by now but I think something has to be done to properly
extend elements without id even in IE (for consistence).

I figured out this all is with Prototype 1.5.1_rc1 so maybe it's fixed
I don't know yet

cheers,

Sebastian


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to