Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE html>
<meta charset="utf-8">
<title>history.replaceState() with an empty string URL and base URL different from document's URL</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<base href="/the-base">
<script>
"use strict";
test(() => {
const before = location.pathname;
history.replaceState(null, null, "");
assert_equals(location.pathname, before);
});
</script>