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.pushState() with a whitespace URL</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
"use strict";
test(() => {
location.hash = "test";
const before = location.pathname;
history.pushState(null, null, " ");
assert_equals(location.pathname, before, "pathname");
assert_equals(location.hash, "", "hash");
});
</script>