<html> | |
<head> | |
<script> | |
var count = 0; | |
function PluginCreated() { | |
count++; | |
document.title = count.toString(); | |
} | |
var id = 1; | |
function inject() { | |
var child = document.createElement("div"); | |
child.innerHTML = '<embed type="application/vnd.npapi-test" src="foo" '+ | |
'name="invoke_js_function_on_create" ' + | |
'id="' + id + '" mode="np_embed">'; | |
document.getElementById("content").appendChild(child); | |
id++; | |
} | |
</script> | |
</head> | |
<body onload="inject();"> | |
<div id="content"></div> | |
</body> | |
</html> |