mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #13818: Add wrapMap entry for col element
This commit is contained in:
parent
78c803f1b5
commit
3a6194076b
@ -16,6 +16,7 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>
|
||||
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
||||
|
||||
thead: [ 1, "<table>", "</table>" ],
|
||||
col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
|
||||
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
||||
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
||||
|
||||
@ -25,7 +26,7 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>
|
||||
// Support: IE 9
|
||||
wrapMap.optgroup = wrapMap.option;
|
||||
|
||||
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.col = wrapMap.thead;
|
||||
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
||||
wrapMap.th = wrapMap.td;
|
||||
|
||||
jQuery.fn.extend({
|
||||
|
@ -2105,3 +2105,17 @@ test( "Make sure specific elements with content created correctly (#13232)", 20,
|
||||
ok( jQuery.nodeName( this, results[ i ] ) );
|
||||
});
|
||||
});
|
||||
|
||||
test( "Validate creation of multiple quantities of certain elements (#13818)", 44, function() {
|
||||
var tags = [ "thead", "tbody", "tfoot", "colgroup", "col", "caption", "tr", "th", "td", "optgroup", "option" ];
|
||||
|
||||
jQuery.each( tags, function( index, tag ) {
|
||||
jQuery( "<" + tag + "/><" + tag + "/>" ).each(function() {
|
||||
ok( jQuery.nodeName( this, tag ), tag + " empty elements created correctly" );
|
||||
});
|
||||
|
||||
jQuery( "<" + this + "></" + tag + "><" + tag + "></" + tag + ">" ).each(function() {
|
||||
ok( jQuery.nodeName( this, tag ), tag + " elements with closing tag created correctly" );
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user