NPN_Evaluate

« Gecko Plugin API Reference « Scripting plugins

Summary

Evaluates a script in the scope of the specified NPObject.

Syntax

#include <npruntime.h>
bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script,
                  NPVariant *result);

Parameters

The function has the following parameters:

npp
The NPP indicating which plugin instance's window to evaluate the script in.
npobj
The scope object.
script
The script to evaluate.
result
On return, contains the value returned by the script. Can't be NULL.

Returns

true if the script was evaluated successfully, otherwise false.

Description

The script is evaluated in the context of the window that the calling plugin instance (the <tt>npp</tt> argument) is loaded in.

Note: The caller must call NPN_ReleaseVariantValue() to release the returned value when it's no longer needed.

Document Tags and Contributors

Tags: 
 Contributors to this page: teoli, Vanuan, ecalot, Sheppy
 Last updated by: teoli,