4 <object id=
"plugin" type=
"application/x-nacl-imc">Plugin not working
</object>
6 <script type=
"text/javascript">
9 var plugin
= document
.getElementById("plugin");
10 function receive(msg
) {
11 dump("Javascript got message: \"" + msg
+ "\"\n");
13 plugin
.get_file("imcread", function(file
) {
14 dump("got file: " + file
+ "\n");
15 var proc
= plugin
.launch(file
, ["arg1", "arg2"], receive
);
16 dump("proc = " + proc
+ "\n");
17 proc
.send("Hello from Javascript to NaCl!", []);
18 plugin
.get_file("input.txt", function(file2
) {
19 proc
.send("Sending file FD", [file2
]);
28 window
.onload
= onload
;