Add an anchor IDL attribute to <popup>, readonly for now

This CL exposes the anchor element as an IDL property. This will be
useful with the anchor positioning proposal (which isn't out yet).

Bug: 1168738
Change-Id: Ia47514dada57c44191c7af439b0051f3e3d26622
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2832148
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Ionel Popescu <iopopesc@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#874440}
diff --git a/html/semantics/interactive-elements/the-popup-element/popup-anchor-element.tentative.html b/html/semantics/interactive-elements/the-popup-element/popup-anchor-element.tentative.html
new file mode 100644
index 0000000..e1c890a
--- /dev/null
+++ b/html/semantics/interactive-elements/the-popup-element/popup-anchor-element.tentative.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" href="mailto:masonf@chromium.org">
+<link rel=help href="https://open-ui.org/components/popup.research.explainer">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<button id=b1>This is an anchor button</button>
+<popup id=p1 anchor=b1>This is a popup</popup>
+<button id=b2 popup=p1>This button invokes the popup but isn't an anchor</button>
+
+<script>
+  test(function() {
+    assert_equals(p1.anchor,b1);
+  }, "popup anchor IDL property returns the anchor element");
+</script>