1
0
Fork 0
firefox/toolkit/components/antitracking/test/browser/file_localStorage.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

21 lines
451 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Bug 1663192 - Accessing localStorage in a file urls</title>
</head>
<script>
window.addEventListener("DOMContentLoaded", () => {
let result = document.getElementById("result");
try {
window.localStorage.setItem("foo", "bar");
result.textContent = "PASS";
} catch (e) {
result.textContent = "FAIL";
}
}, { once: true });
</script>
<body>
<a id="result"></a>
</body>
</html>