mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
Merge pull request #153 from webcomponents/documentmatches
Document.matches shouldn't be defined.
This commit is contained in:
@@ -242,7 +242,13 @@
|
||||
'querySelectorAll',
|
||||
'removeChild',
|
||||
'replaceChild',
|
||||
].concat(matchesNames));
|
||||
]);
|
||||
|
||||
forwardMethodsToWrapper([
|
||||
window.HTMLBodyElement,
|
||||
window.HTMLHeadElement,
|
||||
window.HTMLHtmlElement,
|
||||
], matchesNames);
|
||||
|
||||
forwardMethodsToWrapper([
|
||||
window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument
|
||||
|
||||
@@ -53,6 +53,11 @@ htmlSuite('Document', function() {
|
||||
assert.equal(doc.head.parentNode, doc.documentElement);
|
||||
});
|
||||
|
||||
test('document.matches', function() {
|
||||
var doc = wrap(document);
|
||||
assert.isTrue(doc.matches === undefined);
|
||||
});
|
||||
|
||||
test('getElementsByTagName', function() {
|
||||
var elements = document.getElementsByTagName('body');
|
||||
assert.isTrue(elements instanceof HTMLCollection);
|
||||
|
||||
Reference in New Issue
Block a user