Skip to content

Commit 1e2c317

Browse files
Query selector: removed support for document fragments
Since it’s not well supported, many required methods like `getElementById` or `getElementsByTagName` are not widely supported.
1 parent 77f6b42 commit 1e2c317

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

src/core/find.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
function find ( selector: string, context: Context = doc ) {
55

6-
return context !== doc && context.nodeType !== 1 && context.nodeType !== 9 && context.nodeType !== 11
6+
return context !== doc && context.nodeType !== 1 && context.nodeType !== 9
77
? []
88
: classRe.test ( selector )
99
? context.getElementsByClassName ( selector.slice ( 1 ) )

test/modules/core.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,6 @@ describe ( 'Core', { beforeEach: getFixtureInit ( fixture ) }, function ( it ) {
191191

192192
});
193193

194-
it ( 'supports a document fragment', function ( t ) {
195-
196-
var doc = document.createDocumentFragment (),
197-
ele = $('<p id="foo">')[0];
198-
199-
$(doc).append ( ele );
200-
201-
t.is ( $('#foo', doc)[0], ele );
202-
203-
});
204-
205194
});
206195

207196
});

0 commit comments

Comments
 (0)