UNPKG

823 BJavaScriptView Raw
1define( [
2 "./support"
3], function( support ) {
4
5"use strict";
6
7// We have to close these tags to support XHTML (trac-13200)
8var wrapMap = {
9
10 // XHTML parsers do not magically insert elements in the
11 // same way that tag soup parsers do. So we cannot shorten
12 // this by omitting <tbody> or other required elements.
13 thead: [ 1, "<table>", "</table>" ],
14 col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
15 tr: [ 2, "<table><tbody>", "</tbody></table>" ],
16 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
17
18 _default: [ 0, "", "" ]
19};
20
21wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
22wrapMap.th = wrapMap.td;
23
24// Support: IE <=9 only
25if ( !support.option ) {
26 wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
27}
28
29return wrapMap;
30} );