Changeset 1326 for trunk


Ignore:
Timestamp:
06/22/12 13:56:59 (7 years ago)
Author:
gogo
Message:

#1594 - IE7 broken due to not having hasAttribute, implements a workalike

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r1314 r1326  
    36593659      } 
    36603660       
    3661       if(editor._textArea.hasAttribute('onxinhaready')) 
     3661      if(Xinha.hasAttribute(editor._textArea, 'onxinhaready')) 
    36623662      {                
    36633663        (function() { eval(editor._textArea.getAttribute('onxinhaready')) }).call(editor.textArea); 
     
    79297929  return false; 
    79307930}; 
     7931/** Determines if a given element has a given attribute.  IE<8 doesn't support it nativly */ 
     7932Xinha.hasAttribute = function(el,at) 
     7933{ 
     7934  if(typeof el.hasAttribute == 'undefined') 
     7935  { 
     7936    var node = el.getAttributeNode(at); 
     7937    return !!(node && (node.specified || node.nodeValue)); 
     7938  } 
     7939   
     7940  return el.hasAttribute(at); 
     7941} 
    79317942 
    79327943/** Detect the size of visible area 
Note: See TracChangeset for help on using the changeset viewer.