summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html')
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html
index e4b897d82f..de74239b3b 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html
@@ -20,10 +20,11 @@ async_test(t => {
assert_equals(new URL(e.destination.url).pathname,
"/navigation-api/navigate-event/foo.html");
assert_false(e.destination.sameDocument);
- assert_equals(e.destination.key, "");
- assert_equals(e.destination.id, "");
+ assert_equals(e.destination.key, "");
+ assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
});
a.click();