7 background-color:#ffffc9
16 <textarea rows=
"10" cols=
"100" id=
"output"></textarea>
18 <button type=
"button" onclick=
"App.onClick()" id=
"button" disabled=
"true">Run
</button>
21 <p><button onclick=
"App.geoFindMeCSharp()">Show my location
</button></p>
24 <script type='text/javascript'
>
26 onClick: function () {
27 this.output
.value
= "...";
28 var res
= this.int_add (1, 2);
29 this.output
.value
= res
;
33 this.int_add
= Module
.mono_bind_static_method ("[sample] Math:IntAdd");
34 this.output
= document
.getElementById ("output");
35 this.button
= document
.getElementById ("button");
37 this.button
.disabled
= false;
39 // initialize geolocation sample
40 BINDING
.call_static_method("[sample] GeoLocation.Program:Main", []);
42 geoFindMeCSharp: function () {
43 BINDING
.call_static_method("[sample] GeoLocation.Program:GeoFindMe", [ document
.getElementById("out") ]);
47 // Called from C# passing in the mime type of the image and the
48 // image data converted from byte array to base64
49 function showMyPosition (mimeType
, imageData
)
51 var output
= document
.getElementById("out");
53 var img
= new Image();
54 img
.src
= "data:" + mimeType
+ ";base64," + imageData
;
56 output
.appendChild(img
);
61 <script type=
"text/javascript" src=
"mono-config.js"></script>
62 <script type=
"text/javascript" src=
"runtime.js"></script>
63 <script async
type=
"text/javascript" src=
"mono.js"></script>