File: capture.html

package info (click to toggle)
node-ace-code 1.40.1%2B~cs1.7.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,816 kB
  • sloc: javascript: 258,622; sh: 231; asm: 185; makefile: 130; xml: 85; jsp: 85; objc: 77; lisp: 52; cpp: 34; java: 34; tcl: 30; cobol: 30; pascal: 29; ruby: 27; vhdl: 25; fortran: 21; erlang: 17; python: 13; php: 12; perl: 11; haskell: 10; ml: 10; sql: 6; ada: 5; cs: 3
file content (45 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!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">
	<meta name="author" content="Fabian Jakobs">
	<!-- Date: 2010-04-07 -->
	
	<style type="text/css" media="screen">
	#juhu {
	  width: 100px;
	  height: 50px;
	  background: yellow;	  
	}
	</style>
</head>
<body>

<div id="juhu">
  
</div>

<script src="../src/ace.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">

var el = document.getElementById("juhu");

ace.addListener(el, "mousedown", function(e) {  
  el.innerHTML = ace.getDocumentX(e) + " " + ace.getDocumentY(e);
  ace.capture(
    el,
    function(e) {
      el.innerHTML = ace.getDocumentX(e) + " " + ace.getDocumentY(e);
    }, function() {
      el.innerHTML = "";
    }
  );
});


  
</script>
</body>
</html>