Search code examples
npapi

Can I access the variable in NPAPI like the structure in C language?


As the title,

Can I access the variable in NPAPI like the structure in C language?

for example

Here is a variable called ErrorCode

Can I get and set the varibale like this style in my web

var obj = document.getElementById("pluginObj");
function testui(){
    alert(obj.ErrorCode);
}

3Q


Solution

  • You can if it is a Property.

    (To provide a Property you need to implement HasProperty, GetProperty, and SetProperty)