Move anchorElement IDLs from Element to HTMLElement

Including these on Element allowed the anchor attribute to be used in
XML documents which caused crashes because there was other code which
assumed that only HTML elements can have the anchor element, and it
seems like the HTML spec PR so far is going to only have it on HTML
elements, it would be better if we move this to HTMLElement.

Bug: 334368377
Change-Id: Iab19e3bbf046ad658c037fe9ebe551d7f235d527
diff --git a/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html b/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html
index c5e6d81..9b625e9 100644
--- a/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html
+++ b/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html
@@ -15,11 +15,12 @@
   const target = xmlDoc.documentElement.children[0];
   const anchored = xmlDoc.documentElement.children[1];
 
-  assert_equals(xmlDoc.documentElement.children[1].anchorElement, null,
+  assert_equals(anchored.anchorElement, undefined,
     'Setting the anchor attribute in XML should not set the anchorElement IDL.');
 
+  anchored.removeAttribute('anchor');
   anchored.anchorElement = target;
-  assert_equals(xmlDoc.documentElement.children[1].anchorElement, null,
-    'Setting element.anchorElement in an XML document should not set the anchorElement IDL.');
+  assert_equals(anchored.getAttribute('anchor'), null,
+    'Setting element.anchorElement in an XML document should not set the anchor element.');
 });
 </script>