Skip to content

Commit

Permalink
Add support for onxxx HTML events
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed May 21, 2024
1 parent 5acf76b commit 1a68346
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions test-website/content/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<li><a href="./j%C3%A0v%C3%A0scr%C3%AFpt.html">Javascript with special chars</a></li>
<li><a href="./http-return-codes.html">HTTP return codes</a></li>
<li><a href="./base-href.html">Base href</a></li>
<li><a href="./onxxx.html">onxxx HTML events</a></li>
</ul>
</body>

Expand Down
38 changes: 38 additions & 0 deletions test-website/content/onxxx.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>Test website</title>
<link rel="apple-touch-icon" sizes="180x180" href="./icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./icons/favicon-16x16.png">
<link rel="manifest" href="./icons/site.webmanifest">
<link rel="shortcut icon" href="./icons/favicon.ico">
<style>
.status {
color: red;
}
.status.green {
color: green;
}
</style>
</head>

<body>

<h2>onxxx HTML events</h2>

<p>When clicking images below, it should redirect your browser to the another page</p>

<p>Relative (<a href="./index.html">this site home page</a>): <img src="images/image1.png" onclick="document.location.href='./index.html';"> </p>

<p>Absolute internal 1 (<a href="https://standard_netloc/index.html">this site home page</a>): <img src="images/image1.png" onclick="document.location.href='https://standard_netloc/index.html';"></p>

<p>Absolute internal 2 (<a href="https://not_standard_netloc_punny_encoded/index.html">another site home page</a>): <img src="images/image1.png" onclick="document.location.href='https://not_standard_netloc_punny_encoded/index.html';"></p>

<p>Absolute external (kiwix homepage): <img src="images/image1.png" onclick="document.location.href='https://www.kiwix.org';"></p>

</body>

</html>

0 comments on commit 1a68346

Please sign in to comment.