Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / modules / plugin / sdk / samples / npruntime / test.html
blob8bded7e2145be1fea6526ac4ef36270ada4a0638
1 <HTML>
2 <HEAD>
3 <TITLE>Scriptable Plug-in Test</TITLE>
4 </HEAD>
5 <BODY id="bodyId">
7 <center>
8 <h1>Sample Scriptable Plug-in </h1>
9 </center>
11 This page contains a testcase which demonstrates the work of
12 scriptable 4.x style Navigator plug-in with Mozilla. The example
13 plug-in occupies the area right below this text, and you should see a
14 frame the plug-in draws around its window. Below the plug-in window
15 there are two buttons. Clicking on the buttons will result in calling
16 native plugin methods from JavaScript. Show Version will instruct the
17 plug-in to retrieve the Mozilla user agent string and display it in
18 the plug-in window, Clear button will call plug-in method to erase the
19 window.
21 <br><br>
23 <center>
25 <script>
26 function bar(arg)
28 document.getElementById("result").innerHTML += "<p>" + "function bar(" + arg + ") called!" + "</p>";
30 return 4;
32 </script>
34 <div id="result">
35 <p>results go here:</p>
36 </div>
38 <embed id="embed1" type="application/mozilla-npruntime-scriptable-plugin" width=600 height=40><br>
40 <embed type="application/x-java-mozilla-npruntime-scriptable-plugin" style="display: block; width: 50%; height: 100px;"><br>
42 <script>
43 var embed1 = document.getElementById('embed1');
44 </script>
46 <br>
47 <form name="formname">
48 <input type=button value="Call pluginobj.foo()" onclick='alert(pluginobj.foo())'>
49 <input type=button value="alert(pluginobj.bar)" onclick='alert(pluginobj.bar)'>
50 <input type=button value="alert(pluginobj('foo'))" onclick='alert(pluginobj("foo"))'>
51 <br>
52 <input type=button value="alert(embed1.bar)" onclick='alert(embed1.bar)'>
53 <input type=button value="alert(embed1.foo())" onclick='alert(embed1.foo())'>
54 <input type=button value="alert(embed1())" onclick='alert(embed1())'>
55 <input type=button value="embed1.bar='foo'" onclick='embed1.bar="foo";'>
56 </form>
58 </center>
60 </BODY>
61 </HTML>