https://github.com/web-platform-tests/wpt
Raw File
Tip revision: a9a28f3f94de6eae89f0780128b51e52b2d49b01 authored by Chris Nardi on 02 April 2018, 03:04:33 UTC
Update IRC archive link
Tip revision: a9a28f3
mouse_buttons_back_forward-manual.html
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Mouse Button Back/Forward</title>
        <link rel="author" title="Google" href="http://www.google.com/" />
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
        <script>
            var testMouseUp = async_test('Tests that the mouseup is preventable.');
            var received_back = false;
            var received_forward = false;
            window.addEventListener('mouseup', function(e) {
              if (e.button == 3) {
                received_back = true;
                e.preventDefault();
              } else if (e.button == 4) {
                received_forward = true;
                e.preventDefault();
              }
              if (received_back && received_forward) {
                testMouseUp.done();
              }
            });
        </script>

    </head>
    <body id="target">
        <h4>Test Description: Tests that the mouseup event is prevented.
            <ol>
                <li>Click the back mouse button</li>
                <li>Click the back mouse forward</li>
            </ol>
        </h4>
    </body>
</html>
back to top