https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 951ade940eacfdad4de7530058690a10637a277d authored by Geoffrey Sneddon on 09 April 2018, 11:49:58 UTC
fixup! Move the config into its own class
Tip revision: 951ade9
mouseEvent.html
<!doctype html>
<meta charset=utf-8>
<head>
<title>CSSOM MouseEvent tests</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(function () {
    var mouseEvent = new MouseEvent('mousedown', {clientX: 10, clientY: 20});
    assert_equals(mouseEvent.x, 10);
    assert_equals(mouseEvent.y, 20);
    mouseEvent = new MouseEvent('mousedown', {clientX: 30, clientY: 40});
    assert_equals(mouseEvent.x, 30);
    assert_equals(mouseEvent.y, 40);
}, 'MouseEvent\'s x and y must be equal to clientX and clientY.');
</script>
</head>
back to top