3 <title>Initial Title
</title>
5 function PluginCreated() {
6 document
.title
= "Loaded";
9 function injectPlugin() {
10 var child
= document
.createElement('div');
11 child
.innerHTML
= '<embed type="application/vnd.npapi-test" src="foo"' +
12 ' name="invoke_js_function_on_create" id="plugin"' +
13 ' mode="np_embed"></embed>';
14 document
.getElementById('content').appendChild(child
);
15 // Plugins are loaded synchronously during layout, so the plugin has either
16 // been loaded or blocked at this point.
17 var plugin
= document
.getElementById('plugin');
18 // Check for the "loadedProperty" to determine if plugin is loaded.
19 if (plugin
.loadedProperty
== true) {
20 document
.title
= "Loaded";
22 document
.title
= "Not Loaded";
27 <body onload='injectPlugin();'
>
28 <div id='content'
></div>