github.com/web-platform-tests/wpt.fyi@v0.0.0-20240530210107-70cf978996f1/webapp/templates/analyzer.html (about) 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 {{ template "_head_common.html" . }} 5 <script type="module"> 6 import '/components/reftest-analyzer.js'; 7 8 document.body.addEventListener('keydown', e => { 9 if (e.which == 49) { // The '1' key 10 document.querySelector('reftest-analyzer').selectedImage = 'before'; 11 } else if (e.which === 50) { // The '2' key 12 document.querySelector('reftest-analyzer').selectedImage = 'after'; 13 } 14 }); 15 </script> 16 </head> 17 <body> 18 <div id="content"> 19 <reftest-analyzer before="{{.Data.Before}}" after="{{.Data.After}}"> 20 </reftest-analyzer> 21 </div> 22 </body> 23 </html>