From 966a70909019aa09632c87c0002c522fa4a1e30e Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Mon, 30 Mar 2020 20:15:09 +0200 Subject: Manipulation: Skip the select wrapper for "; + support.option = !!div.lastChild; } )(); return support; diff --git a/src/manipulation/wrapMap.js b/src/manipulation/wrapMap.js index 1f446f7d7..da48bf9fe 100644 --- a/src/manipulation/wrapMap.js +++ b/src/manipulation/wrapMap.js @@ -1,13 +1,12 @@ -define( function() { +define( [ + "./support" +], function( support ) { "use strict"; // We have to close these tags to support XHTML (#13200) var wrapMap = { - // Support: IE <=9 only - option: [ 1, "" ], - // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten // this by omitting or other required elements. @@ -19,11 +18,13 @@ var wrapMap = { _default: [ 0, "", "" ] }; -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + return wrapMap; } ); -- cgit v1.2.3