-
Notifications
You must be signed in to change notification settings - Fork 1
/
xaml.xhtml
39 lines (32 loc) · 1.24 KB
/
xaml.xhtml
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
<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg">
<head>
<title>firelight</title>
<script type="text/javascript" src="jquery-1.2.6.js" />
<script type="text/javascript" src="firelight-debug.js" />
<script type="text/javascript">
<![CDATA[
$(document).ready(function() {
var host = new SvgHost ();
host.setDOMElement (document.getElementById("svg-host")); // jquery doesn't seem to work here
XamlReader.loadFromUrl ("test3.xaml",
function (root) {
host.setRootVisual (root);
host.rootVisual.findName("top").addEventListener ("MouseLeftButtonDown",
function(sender, args) { alert ("button down!"); });
host.rootVisual.findName("demoAnimation").start();
});
});
]]>
</script>
</head>
<body>
<svg:svg id="svg-host"
width="1024"
height="768"
version="1.1" />
</body>
</html>