1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <!-- Copyright 2008 Google Inc. All rights reserved. -->
6 <title>SRPC Simple Plug-in
</title>
7 <script type=
"text/javascript">
8 // fortytwo is invoked when its button is pressed.
17 var myobj
= new testobj();
20 alert(document
.getElementById('pluginobj').fortytwo(myobj
));
25 // helloworld is invoked when its button is pressed
27 function helloworld() {
28 var myobj
= "hi there";
30 myobj
.utf8length
= 0xFFFFFFFF;
31 myobj
.length
= 0xFFFFFFFF;
34 alert(document
.getElementById('pluginobj').helloworld(myobj
));
42 <h1>Native Client SRPC Simple Plug-in
</h1>
44 <button type=
"button" onclick=
"fortytwo()" id=
"ftbuttonobj">
47 <button type=
"button" onclick=
"helloworld()" id=
"hwbuttonobj">
50 <embed id=
"pluginobj" type=
"application/x-nacl-srpc"
51 width=
"0" height=
"0" src=
"issue63.nexe" />
54 If the plug-in is working correctly, a click on the
"Call fortytwo()"
55 button should open a popup dialog containing
<b>42</b> and a click
56 on the
"Call helloworld()" button should open a popup dialog containing
60 <b>Note:
</b> For the purposes of contest issue #
63, the actual expected
61 result will be a
"Method invocation failed" dialog when either the
62 "Call fortytwo()" button or the
"Call helloworld()" button is clicked.
63 The browser should continue to work properly after the dialog is closed.