Skip to content

Commit

Permalink
adding test for pattern attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor authored and Modernizr committed Dec 4, 2009
1 parent 7565f54 commit de7b4e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ window.Modernizr = (function(window,doc){
inputAutofocus = 'inputautofocus',
inputPlaceholders = 'inputplaceholders',
inputMultiple = 'inputmultiple',
inputPattern = 'inputpattern',

// list of property values to set for css tests
setProperties = ' -o- -moz- -ms- -webkit- '.split(' '),
Expand Down Expand Up @@ -499,6 +500,10 @@ window.Modernizr = (function(window,doc){
tests[inputMultiple] = function() {
return 'multiple' in f;
};

tests[inputPattern] = function() {
return 'pattern' in f;
};

// Run through all tests and detect their support in the current UA.
for ( feature in tests ) {
Expand Down

0 comments on commit de7b4e7

Please sign in to comment.