wrapMap.js 823 B

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