This project is archived and is in readonly mode.

#21 ✓resolved
Thomas Aylott

element Attribute error in ie

Reported by Thomas Aylott | May 28th, 2008 @ 10:00 AM | in 2.0 (closed)

Originally posted on Trac by sleets

Original Trac Ticket

Description

[html]

[/html]
    $(el).getAttribute( 'empty') // return sss in firefox
    //return  Element.Prototype.empty in ie.

Trac Attachments

Trac Comments

Changed 7 months ago by sleets


        
i think change HTMLElement.prototype maybe  raise a lot of trouble.  

The following methods for reference 

var $ = function (el){
   if( el.$wrap ) return el.$wrap;
   if( el.nodeName ){
       el.$wrap = new Element(); // retuern a new Element.prototype object
       el.$wrap.element = el;   // the wrap.element reference to the HTMLElement
       Garbage.colect(el);
   }
   return el.$wrap;
}
//Element.prototype != HTMLElement.prototype;

      

Changed 7 months ago by sleets


        
with el.$wrap === Element instance; 

Element.prototype.setHTML = function(shtml){
   this.element.innerHTML = shtml;
   return  this;
}

      

Changed 7 months ago by sleets


        [html]

[/html]

window.addEvent('domready', function(){
	alert( document.getElementById('xx').outerHTML ) // 
	alert($('xx').outerHTML ) //  
});

Browser is ie. 

      

Changed 7 months ago by kamicane



                  Changed 7 months ago by kamicane

          owner
              set to kamicane
        
          status
              changed from new to assigned
        
          milestone
              changed from Mootools version 1.2 to Mootools version 1.3

          owner
              set to kamicane
        
          status
              changed from new to assigned
        
          milestone
              changed from Mootools version 1.2 to Mootools version 1.3
        
      

Changed 4 months ago by kamicane


        
it is currently impossible to name an element attribute the same as a MooTools element method. Internet explorer will return the method with getAttribute. 

We'll have more time to find a solution to fix this stupid explorer bug in 1.3 

      

Changed 2 weeks ago by tomocchino



                  Changed 2 weeks ago by tomocchino

          milestone
              set to Mootools version 1.3

          milestone
              set to Mootools version 1.3
        
      

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Tags

Pages