Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser-plugin/scriptable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'browser-plugin/scriptable.cpp')
-rw-r--r--browser-plugin/scriptable.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/browser-plugin/scriptable.cpp b/browser-plugin/scriptable.cpp
index 0be9736..ff4f064 100644
--- a/browser-plugin/scriptable.cpp
+++ b/browser-plugin/scriptable.cpp
@@ -293,6 +293,22 @@ ScriptablePluginObject::SetProperty (NPIdentifier name, const NPVariant *value)
return false;
}
+void
+ScriptablePluginObject::CallBrowser (const char *function_name)
+{
+ if (!mMagicWrapper) {
+ return;
+ }
+
+ NPVariant rval;
+
+ if (NPERR_NO_ERROR == NPN_Invoke (mNpp, mMagicWrapper,
+ NPN_GetStringIdentifier (function_name),
+ NULL, 0, &rval)) {
+ NPN_ReleaseVariantValue (&rval);
+ }
+}
+
bool
ScriptablePluginObject::Invoke (NPIdentifier name, const NPVariant *args,
uint32_t argCount, NPVariant *result)