blob: c5461eaed3d9e7f94f510674729bb1381ecc30f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<!DOCTYPE HTML>
<html>
<head>
<title>Test for the download attribute</title>
</head>
<body>
hi
<script>
const host = window.location.host;
const path = location.pathname.replace("http_download_page.html","http_download_server.sjs");
const insecureLink = document.createElement("a");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
insecureLink.href=`http://${host}/${path}`;
insecureLink.download="true";
insecureLink.id="http-link";
insecureLink.textContent="Not secure Link";
document.body.append(insecureLink);
</script>
</body>
</html>
|