From 209278915592fc63bd62039e246046d446d329e0 Mon Sep 17 00:00:00 2001 From: John Resig Date: Sun, 6 Dec 2009 17:26:39 -0800 Subject: [PATCH] Added in support for injecting area elements into map elements. Fixes #4484. --- src/manipulation.js | 1 + test/unit/manipulation.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/manipulation.js b/src/manipulation.js index 7d7038e..9103111 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -17,6 +17,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, tr: [ 2, "", "
" ], td: [ 3, "", "
" ], col: [ 2, "", "
" ], + area: [ 1, "", "" ], _default: [ 0, "", "" ] }; diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 75a1baa..44fafa9 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -659,7 +659,7 @@ test("val(Function)", function() { }) var testHtml = function(valueObj) { - expect(20); + expect(22); jQuery.scriptorder = 0; @@ -693,6 +693,10 @@ var testHtml = function(valueObj) { equals( $div2.html("x" + insert).html(), "x" + insert, "Verify escaped insertion." ); equals( $div2.html(" " + insert).html(), " " + insert, "Verify escaped insertion." ); + var map = jQuery("").html(valueObj("jQuery")); + + equals( map[0].childNodes.length, 1, "The area was inserted." ); + equals( map[0].firstChild.nodeName.toLowerCase(), "area", "The area was inserted." ); reset(); -- 1.7.10.4