electron/spec/fixtures/pages/mouse-events.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
561 B
HTML
Raw Normal View History

<html>
<body>
<input type="text" id="input" autofocus />
<script type="text/javascript" charset="utf-8">
const { ipcRenderer } = require('electron')
document.onmousedown = function (e) {
ipcRenderer.send('mousedown', e.button, e.x, e.screenX, e.y, e.screenY)
}
document.onmouseup = function (e) {
ipcRenderer.send('mouseup', e.button, e.x, e.screenX, e.y, e.screenY)
}
document.onmousemove = function (e) {
ipcRenderer.send('mousemove', e.button, e.x, e.screenX, e.y, e.screenY)
}
</script>
</body>
</html>