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
9d4033d6
Commit
9d4033d6
authored
May 26, 2011
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for appending an xml element to another. Supplements #9370.
parent
bdce86dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
manipulation.js
test/unit/manipulation.js
+34
-0
No files found.
test/unit/manipulation.js
View file @
9d4033d6
...
@@ -465,6 +465,40 @@ test("append the same fragment with events (Bug #6997, 5566)", function () {
...
@@ -465,6 +465,40 @@ test("append the same fragment with events (Bug #6997, 5566)", function () {
jQuery
(
"#listWithTabIndex li.test6997"
).
eq
(
1
).
click
();
jQuery
(
"#listWithTabIndex li.test6997"
).
eq
(
1
).
click
();
});
});
test
(
"append(xml)"
,
function
()
{
expect
(
1
);
function
createXMLDoc
()
{
// Initialize DOM based upon latest installed MSXML or Netscape
var
elem
,
aActiveX
=
[
"MSXML6.DomDocument"
,
"MSXML3.DomDocument"
,
"MSXML2.DomDocument"
,
"MSXML.DomDocument"
,
"Microsoft.XmlDom"
];
if
(
document
.
implementation
&&
"createDocument"
in
document
.
implementation
)
{
return
document
.
implementation
.
createDocument
(
""
,
""
,
null
);
}
else
{
// IE
for
(
var
n
=
0
,
len
=
aActiveX
.
length
;
n
<
len
;
n
++
)
{
try
{
elem
=
new
ActiveXObject
(
aActiveX
[
n
]
);
return
elem
;
}
catch
(
_
){};
}
}
}
var
xmlDoc
=
createXMLDoc
(),
xml1
=
xmlDoc
.
createElement
(
"head"
),
xml2
=
xmlDoc
.
createElement
(
"test"
);
ok
(
jQuery
(
xml1
).
append
(
xml2
),
"Append an xml element to another without raising an exception."
);
});
test
(
"appendTo(String|Element|Array<Element>|jQuery)"
,
function
()
{
test
(
"appendTo(String|Element|Array<Element>|jQuery)"
,
function
()
{
expect
(
16
);
expect
(
16
);
...
...
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