Created
September 3, 2015 14:53
-
-
Save davestevens/d30a9dee975ba03eab55 to your computer and use it in GitHub Desktop.
replaceState test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Opening this in the latest Chrome (Version 45.0.2454.85) results in an error | |
"Uncaught SecurityError: Failed to execute 'replaceState' on 'History'" | |
This has only just stated happening this afternoon and doesn't cause an issue on older versions of Chrome | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Testing replaceState</title> | |
</head> | |
<body> | |
<h1>Testing replaceState</h1> | |
<p id="error-display">No errors</p> | |
<script> | |
var error_display = document.getElementById("error-display"); | |
window.onerror = function(message, _url, _line_number) { | |
error_display.textContent = message; | |
return true; | |
}; | |
window.history.replaceState({}, '', '#test'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Opening this in the latest Chrome (Version 45.0.2454.85) results in an error:
This has only just stated happening this afternoon and doesn't cause an issue on older versions of Chrome.
Running this on a server causes no issues.