Merge pull request #153 from webcomponents/documentmatches

Document.matches shouldn't be defined.
This commit is contained in:
Steve Orvell
2015-01-16 12:49:55 -08:00
2 changed files with 12 additions and 1 deletions

View File

@@ -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

View File

@@ -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);