Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8797

Show
Ignore:
Timestamp:
02/03/08 19:45:32 (8 months ago)
Author:
tobie
Message:

prototype: Allow Selector to correctly detect the presence of namespaced attributes. Closes #10987.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/trunk/CHANGELOG

    r8796 r8797  
     1* Allow Selector to correctly detect the presence of namespaced attributes. Closes #10987. [Samuel Lebeau, Tobie Langel] 
     2 
    13* Make Element#absolutize and Element#relativize always return element. Closes #10983. [kangax] 
    24 
  • spinoffs/prototype/trunk/src/selector.js

    r8721 r8797  
    274274    pseudo:       
    275275/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/, 
    276     attrPresence: /^\[([\w]+)\]/, 
     276    attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/, 
    277277    attr:         /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ 
    278278  }, 
  • spinoffs/prototype/trunk/test/unit/selector.html

    r8721 r8797  
    269269      } else 
    270270        info("Could not test XPath bypass: no XPath to begin with!"); 
     271       
     272      assertElementsMatch($$('[xml:lang]'), 'html', '#item_3'); 
     273      assertElementsMatch($$('*[xml:lang]'), 'html', '#item_3'); 
    271274    }}, 
    272275