aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation/wrapMap.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-05-05 11:44:55 -0700
committerTimmy Willison <timmywillisn@gmail.com>2015-05-05 11:44:55 -0700
commita74320fca8bb0a2190f6e1fdb71a73733b6986e4 (patch)
tree36e4af65a7acfb354f7d713a1859ba81e7d53116 /src/manipulation/wrapMap.js
parent6d7ef56ed3004a18f5139928455cdbdc169e1232 (diff)
downloadjquery-a74320fca8bb0a2190f6e1fdb71a73733b6986e4.tar.gz
jquery-a74320fca8bb0a2190f6e1fdb71a73733b6986e4.zip
Manipulation: privatize buildFragment() function
Fixes gh-2224
Diffstat (limited to 'src/manipulation/wrapMap.js')
-rw-r--r--src/manipulation/wrapMap.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/manipulation/wrapMap.js b/src/manipulation/wrapMap.js
new file mode 100644
index 000000000..7080bf996
--- /dev/null
+++ b/src/manipulation/wrapMap.js
@@ -0,0 +1,35 @@
+define(function() {
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ thead: [ 1, "<table>", "</table>" ],
+
+ // Some of the following wrappers are not fully defined, because
+ // their parent elements (except for "table" element) could be omitted
+ // since browser parsers are smart enough to auto-insert them
+
+ // Support: Android 2.3
+ // Android browser doesn't auto-insert colgroup
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+
+ // Auto-insert "tbody" element
+ tr: [ 2, "<table>", "</table>" ],
+
+ // Auto-insert "tbody" and "tr" elements
+ td: [ 3, "<table>", "</table>" ],
+
+ _default: [ 0, "", "" ]
+};
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+return wrapMap;
+});