big-moving.ru/api/soft/Ace/experiments/triple_click.html

35 lines
775 B
HTML
Executable File

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>triple_click</title>
<meta name="author" content="Fabian Jakobs">
</head>
<body>
<div id="juhu">
Juhu Kinners
</div>
<script src="../src/ace/lib/core.js" type="text/javascript" charset="utf-8"></script>
<script src="../src/ace/lib/event.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var el = document.getElementById("juhu");
ace.addTripleClickListener(el, function() {
console.log("triple");
});
ace.addListener(el, "selectstart", function(e) {
return ace.preventDefault(e);
});
</script>
</body>
</html>