gecko/browser/base/content/test/general/browser_duplicateIDs.js

9 lines
201 B
JavaScript
Raw Normal View History

function test() {
var ids = {};
Array.forEach(document.querySelectorAll("[id]"), function (node) {
var id = node.id;
ok(!(id in ids), id + " should be unique");
ids[id] = null;
});
}