Permalink
Browse files

bug 6158; fixing replaceWith from throwing errors on non existant ele…

…ments; fixing semicolon
  • Loading branch information...
jboesch committed Mar 5, 2011
1 parent c9ef09c commit dd100bf5ac56d5d44afe45d73fe1824bd0135872
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/unit/manipulation.js
@@ -799,9 +799,9 @@ var testReplaceWith = function(val) {
var set = jQuery("<div/>").replaceWith(val("<span>test</span>"));
equals( set[0].nodeName.toLowerCase(), "span", "Replace the disconnected node." );
equals( set.length, 1, "Replace the disconnected node." );

var non_existant = jQuery('#does-not-exist').replaceWith( val("<b>should not throw an error</b>") );
equals( non_existant.length, 0, "Length of non existant element." )
equals( non_existant.length, 0, "Length of non existant element." );

var $div = jQuery("<div class='replacewith'></div>").appendTo("body");
// TODO: Work on jQuery(...) inline script execution

0 comments on commit dd100bf

Please sign in to comment.