<!DOCTYPE html>
<meta charset="utf-8">
<title>querySelectorAll must not return removed elements</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- Regression test for https://github.com/jsdom/jsdom/issues/2519 -->

<div id="container"></div>

<script>
"use strict";

setup({ single_test: true });

const container = document.querySelector("#container");
function getIDs() {
  return [...container.querySelectorAll("a.test")].map(el => el.id);
}