Created
November 8, 2013 18:13
-
-
Save jansepar/7375182 to your computer and use it in GitHub Desktop.
Minimal testcase that causes anchor tags to behave in non-standard ways in Firefox when recreating the document using document.open/document.write.
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<title>Link href minimal testcase</title> | |
</head> | |
<body class="foo"> | |
<script> | |
setTimeout(function(){ | |
document.open(); | |
document.write('<html><head></head><body><a href="#">Click me! I should\'t cause a reload...</a></body></html>'); | |
document.close(); | |
}, 200) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment