From 937923d9ee8dfd19008447b5059cbd13ee5a23ac Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Mon, 8 Jan 2024 12:30:39 -0500 Subject: Manipulation: Support $el.html(selfRemovingScript) (#5378) Don't try to remove a script element that has already removed itself. Also, compress `DOMEval.js`. Fixes gh-5377 Closes gh-5378 --- test/unit/manipulation.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index e197712fb..b40ba6056 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -1819,6 +1819,21 @@ QUnit.test( "html(script nomodule)", function( assert ) { }, 1000 ); } ); +QUnit.test( "html(self-removing script) (gh-5377)", function( assert ) { + assert.expect( 2 ); + + var $fixture = jQuery( "#qunit-fixture" ); + + $fixture.html( + [ + "", + "
", + "", + "
" + ].join( "" ) + ); +} ); + QUnit.test( "html(Function) with incoming value -- direct selection", function( assert ) { assert.expect( 4 ); -- cgit v1.2.3