Renovate bot | f591dcf | 2023-12-30 14:13:54 +0000 | [diff] [blame] | 1 | define( [ |
| 2 | "./support" |
| 3 | ], function( support ) { |
Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 4 | |
| 5 | "use strict"; |
| 6 | |
| 7 | // We have to close these tags to support XHTML (#13200) |
| 8 | var wrapMap = { |
| 9 | |
Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 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 | |
Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 21 | wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; |
| 22 | wrapMap.th = wrapMap.td; |
| 23 | |
Renovate bot | f591dcf | 2023-12-30 14:13:54 +0000 | [diff] [blame] | 24 | // Support: IE <=9 only |
| 25 | if ( !support.option ) { |
| 26 | wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ]; |
| 27 | } |
| 28 | |
Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 29 | return wrapMap; |
| 30 | } ); |