Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
dd100bf5
Commit
dd100bf5
authored
Mar 05, 2011
by
Jordan Boesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 6158; fixing replaceWith from throwing errors on non existant elements; fixing semicolon
parent
c9ef09c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
manipulation.js
test/unit/manipulation.js
+2
-2
No files found.
test/unit/manipulation.js
View file @
dd100bf5
...
@@ -799,9 +799,9 @@ var testReplaceWith = function(val) {
...
@@ -799,9 +799,9 @@ var testReplaceWith = function(val) {
var
set
=
jQuery
(
"<div/>"
).
replaceWith
(
val
(
"<span>test</span>"
));
var
set
=
jQuery
(
"<div/>"
).
replaceWith
(
val
(
"<span>test</span>"
));
equals
(
set
[
0
].
nodeName
.
toLowerCase
(),
"span"
,
"Replace the disconnected node."
);
equals
(
set
[
0
].
nodeName
.
toLowerCase
(),
"span"
,
"Replace the disconnected node."
);
equals
(
set
.
length
,
1
,
"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>"
)
);
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"
);
var
$div
=
jQuery
(
"<div class='replacewith'></div>"
).
appendTo
(
"body"
);
// TODO: Work on jQuery(...) inline script execution
// TODO: Work on jQuery(...) inline script execution
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment