Skip to content

Commit

Permalink
add new feature-detect for DOM 3 Document Fragments
Browse files Browse the repository at this point in the history
reports true as expected in IE 6-10, Chrome, Opera
  • Loading branch information
jokeyrhyme committed Sep 5, 2013
1 parent 9a65f84 commit 41b2cb9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions feature-detects/dom/documentfragment.js
@@ -0,0 +1,31 @@
/*!
{
"name": "Document Fragment",
"property": "documentfragment",
"notes": [{
"name": "W3C DOM Level 1 Reference",
"href": "http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3"
}, {
"name": "SitePoint Reference",
"href": "http://reference.sitepoint.com/javascript/DocumentFragment"
}, {
"name": "QuirksMode Compatibility Tables",
"href": "http://www.quirksmode.org/m/w3c_core.html#t112"
}],
"authors": ["Ron Waldon (@jokeyrhyme)"],
"knownBugs": ["false-positive on Blackberry 9500, see QuirksMode note"],
"tags": []
}
!*/
/* DOC
Append multiple elements to the DOM within a single insertion.
*/
define(['Modernizr', 'docElement'], function(Modernizr, docElement) {
Modernizr.addTest('documentfragment', function() {
return 'createDocumentFragment' in document &&
'appendChild' in docElement;
});
});

0 comments on commit 41b2cb9

Please sign in to comment.