4 <script src=
"npapi.js"></script>
9 <div id=
"statusPanel" style=
"border: 1px solid red; width: 100%">
14 NPObject Lifetime test
<p>
16 Tests the case where a plugin holds on to an NPObject reference
17 to another plugin in a different frame in the page and whether
18 the npobject is callable when the frame is destroyed.
20 <div ID=npobject_lifetime_test_instance2
>
21 <iframe src=
"npobject_lifetime_test_second_instance.html" name=
"plugin_frame">
25 <embed type=
"application/vnd.npapi-test"
27 name=
"npobject_lifetime_test"
33 function GetSecondPluginInstance() {
34 var plugin_frame
= window
.frames
["plugin_frame"];
36 alert("failed to find frame in frames list");
40 var plugin
= plugin_frame
.document
.getElementById(2);
42 alert("Failed to locate second plugin");
48 function DeleteSecondPluginInstance() {
49 var frame_div
= document
.getElementById("npobject_lifetime_test_instance2");
50 if (frame_div
.parentNode
&& frame_div
.parentNode
.removeChild
) {
51 frame_div
.parentNode
.removeChild(frame_div
);