mozilla
您的搜索结果

    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.

    文档标签和贡献者

    标签: 
    Contributors to this page: Sheppy, Vanuan, ecalot
    最后编辑者: Vanuan,