blob: d4f33dbc186330f1c899bb4f38954655fdc03657 (
plain)
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
|
<!DOCTYPE html>
<html>
<!--
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<head>
<title>hello_tutorial</title>
<script type="text/javascript">
// The 'message' event handler. This handler is fired when the NaCl module
// posts a message to the browser by calling PPB_Messaging.PostMessage()
// (in C) or pp::Instance.PostMessage() (in C++). This implementation
// simply displays the content of the message in an alert panel.
function handleMessage(message_event) {
console.log('message:', message_event.data)
//alert(message_event.data);
}
</script>
<style>
button {
position: relative;
z-index: 5;
top: -300px;
left: 350px;
}
</style>
</head>
<body>
<div id="listener">
<script type="text/javascript">
var listener = document.getElementById('listener');
listener.addEventListener('message', handleMessage, true);
</script>
<embed
id="hello_tutorial"
width="800"
height="600"
type="application/x-hello" />
</div>
<button>Кнопка поверх OpenGL</button>
</body>
</html>
|