M
MartinRinehart
In my next post I'll submit an Opera-only, canvas-based widget. My
intent is to write code that runs in Chrome, Firefox, Opera and
Safari. Below is a tiny tester for the events I want to handle. Any
help getting this to support the <canvas> community would be
appreciated.
--------------------------------------
<! t.html - test event handling>
<html>
<head>
<script>
function click_() { alert( 'click' ); }
function keyPress() { alert( 'keyPress' ); }
function wheel() { alert( 'wheel' ); }
</script>
<style>
table {
position:absolute; top:10px; left:10px;
background: red;
}
.label {
position:absolute; top:80px; left:10px;
}
canvas {
position:absolute; top:100px; left:10px;
background:blue;
}
</style>
</head>
<body>
<button style='font-size:18px; background:yellow'
onclick=click_() onkeypress=keyPress() onmousewheel=wheel()>
button
</button>
<div class=label>Canvas:</div>
<canvas height=50 width=100
onclick=click() onkeypress=keyPress() onmousewheel=wheel()>
no canvas
</canvas>
</body>
</html>
<! end of t.html>
intent is to write code that runs in Chrome, Firefox, Opera and
Safari. Below is a tiny tester for the events I want to handle. Any
help getting this to support the <canvas> community would be
appreciated.
--------------------------------------
<! t.html - test event handling>
<html>
<head>
<script>
function click_() { alert( 'click' ); }
function keyPress() { alert( 'keyPress' ); }
function wheel() { alert( 'wheel' ); }
</script>
<style>
table {
position:absolute; top:10px; left:10px;
background: red;
}
.label {
position:absolute; top:80px; left:10px;
}
canvas {
position:absolute; top:100px; left:10px;
background:blue;
}
</style>
</head>
<body>
<button style='font-size:18px; background:yellow'
onclick=click_() onkeypress=keyPress() onmousewheel=wheel()>
button
</button>
<div class=label>Canvas:</div>
<canvas height=50 width=100
onclick=click() onkeypress=keyPress() onmousewheel=wheel()>
no canvas
</canvas>
</body>
</html>
<! end of t.html>