views:

35

answers:

1

Hi, I'm writing an NPAPI plugin. In every webpage that the browser goes to, I inject my plugin with an object tag. Something like:

<object id="myplugin" type="plugin-mime-type" >

In some pages where i dont want it, after injection i remove it by finding the element using the id and doing a document.removeChild. From my logging i found that in firefox and opera, doing this automatically calls the plugin destroy method NPP_Destroy (NPAPI). But in chrome, it doesnt seem to call it. Is there any special way that i should remove a plugin in chrome that i am missing??

Any help would be appreciated.

Thanks

A: 

Solved the issue by putting the object into a div and setting the div's display to none while removing. That killed the plugin process.

kambamsu