summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html-longdesc/reflected-changing-longdesc-manual.html
blob: 5e3ac13757a9936f27e88761fe3b6ba730710942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<html>
 <head>
  <title>Longdesc test: Reflection when longdesc changes</title>
 </head>
 <body>
  <img src="picture.png" alt="the image" longdesc="fail.html">
  <script>
    var failingResult = document.querySelector('img[longdesc]').longDesc;
    var newValue = '<img src="picture.png" alt="the image" longdesc="pass.html">';

    document.querySelector('img').outerHTML = newValue;
    document.location.href = document.querySelector('img[longdesc]').longDesc;
  </script>
 </body>
</html>