Skip to content

Instantly share code, notes, and snippets.

@penk
Created July 25, 2010 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penk/489552 to your computer and use it in GitHub Desktop.
Save penk/489552 to your computer and use it in GitHub Desktop.
sprintf(buffer,
"if ($('#'+%d.length != 0) { $('#'+%d.remove(); }", This->id, This->id );
if( NPERR_NO_ERROR == NPN_GetValue(instance, NPNVWindowNPObject, &plugin) )
{
NPString script;
script.utf8characters = buffer;
script.utf8length = strlen(script.utf8characters);
NPVariant result;
if (NPN_Evaluate(instance, plugin, &script, &result))
{
NPN_ReleaseVariantValue(&result);
}
}
NPN_ReleaseObject(plugin);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment