aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorSai Wong <sai.wong@huffingtonpost.com>2012-10-15 14:20:36 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-10-20 15:27:43 -0400
commit2b0e720406c42a4065010ba94e7adb7170ba74c3 (patch)
tree9b895ae823c20230f7be9d33bd3d9c4359c34600 /test/data
parent144b8bfeadc5316656105e1a10a31ba5348ef5d6 (diff)
downloadjquery-2b0e720406c42a4065010ba94e7adb7170ba74c3.tar.gz
jquery-2b0e720406c42a4065010ba94e7adb7170ba74c3.zip
Fix #12048. Set attributes for XML fragments. Close gh-965.
Diffstat (limited to 'test/data')
-rw-r--r--test/data/testinit.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/data/testinit.js b/test/data/testinit.js
index 99b0f11e1..6f9fd46e6 100644
--- a/test/data/testinit.js
+++ b/test/data/testinit.js
@@ -102,6 +102,21 @@ var createWithFriesXML = function() {
return jQuery.parseXML(string);
};
+var createXMLFragment = function() {
+ var xml, frag;
+ if ( window.ActiveXObject ) {
+ xml = new ActiveXObject("msxml2.domdocument");
+ } else {
+ xml = document.implementation.createDocument( "", "", null );
+ }
+
+ if ( xml ) {
+ frag = xml.createElement("data");
+ }
+
+ return frag;
+};
+
var fireNative;
if ( document.createEvent ) {
fireNative = function( node, type ) {