mg);
  img.setAttribute("id", "changing-one");
  assert_equals(window["changing-one"], img);

  img.setAttribute("id", "changing-two");
  assert_false("changing-one" in window);
  assert_equals(window["changing-two"], img);
}, "Changing an attribute must update the named properties (id)");

test(() => {
  const img = document.createElement("img");
  document.body.appendChild(img);
  img.setAttribute("name", "changing-name-one");
  assert_equals(window["changing-name-one"], img);

  img.setAttribute("name", 