forked from c-smile/sciter-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.htm
56 lines (42 loc) · 1.28 KB
/
default.htm
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
46
47
48
49
50
51
52
53
54
55
56
<html>
<head>
<meta name="generator" content="microsoft visual studio 8.0">
<title>plain-api demo</title>
<script type="text/tiscript">
namespace Test {
function add(n1,n2) { return n1+n2; }
// function add(n1,n2) { return n / 0; } // error simulation, will throw sciter::script_error with .what() -> stack trace
}
event click $(#test) {
var data = self.request(5000, #get, "res:test.json");
$(pre#out).text = data.toString();
};
event click $(#dependent-window) {
view.window {
url: self.url(),
type: View.FRAME_WINDOW,
alignment: -5,
width:800,
height:600,
};
}
</script>
<style>
html { background:white; font:system; }
frameset { border:3dip solid; }
frameset > div { background:#fff; }
</style>
</head>
<body>
<img src="res:go.png">
<em>Test</em> document content.
<p>Test Element.request(#get) for local resource: <button #test>Test rq</button></p>
<p>Test view.window {} call: <button #dependent-window>Show secondary window</button></p>
<pre#out />
frameset demo:
<frameset cols="200dip,*">
<div #first>1</div>
<div #second>2</div>
</frameset>
</body>
</html>