Make sure that the contents of the element is still in place when html(Function) is called. Fixes #6733.
This commit is contained in:
parent
e3c4e57897
commit
0368606c08
2 changed files with 13 additions and 4 deletions
|
@ -955,6 +955,17 @@ test("html(String)", function() {
|
|||
|
||||
test("html(Function)", function() {
|
||||
testHtml(functionReturningObj);
|
||||
|
||||
expect(33);
|
||||
|
||||
QUnit.reset();
|
||||
|
||||
jQuery("#main").html(function(){
|
||||
return jQuery(this).text();
|
||||
});
|
||||
|
||||
ok( !/</.test( jQuery("#main").html() ), "Replace html with text." );
|
||||
ok( jQuery("#main").html().length > 0, "Make sure text exists." );
|
||||
});
|
||||
|
||||
test("html(Function) with incoming value", function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue