mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-16 12:30:13 +01:00
42 lines
868 B
HTML
42 lines
868 B
HTML
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE>Simple Plug-in Test</TITLE>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
|
||
|
<center>
|
||
|
<h1> XPConnect Scriptable Sample Plug-in </h1>
|
||
|
</center>
|
||
|
|
||
|
This page contains a testcase which demonstrates the work of scriptable
|
||
|
plug-in with Mozilla. This example plug-in has no native GUI and does not
|
||
|
draw anything in the plugin window. Clicking on the button will result in calling
|
||
|
native plugin method from JavaScript. Show Version will instruct the plug-in
|
||
|
to retrieve the Mozilla user agent string and return it to JavaScript to show
|
||
|
in the alert box.
|
||
|
|
||
|
<br><br>
|
||
|
|
||
|
<center>
|
||
|
|
||
|
<embed type="application/simple-plugin" width=1 height=1 hidden="true"><br>
|
||
|
|
||
|
<script>
|
||
|
var embed = document.embeds[0];
|
||
|
|
||
|
function ShowVersion()
|
||
|
{
|
||
|
alert(embed.version);
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<br>
|
||
|
<form name="formname">
|
||
|
<input type=button value="Show Version" onclick='ShowVersion()'>
|
||
|
</form>
|
||
|
|
||
|
</center>
|
||
|
|
||
|
</BODY>
|
||
|
</HTML>
|