How to write my own Javascript API (client-side) for a native code library (C/C++)

I must develop a Web App with HTML 5 and Javascript for client side. But i need to use the funcionalities that provides a client's native library (.dll/.so) to process some data on it´s machine with C/C++.

I like to write my own API in Javascript to access native library, like NodeJS's addons define, but those addons only are accessible from NodeJS (server-side). Also there is a well established NPAPI but seems that Google's PPAPI wants to replace it: I could not decide on any of them.

Is there something similar to NodeJS's addons for client-side that allow me to focus only on C++, Javascript and HTML 5?

Thanks.

Not in any general sense. Addons for node.js are allowed because there is an implicit trust relationship between the author of the code and the person running it. (Indeed, they're usually the same person.) In web browsers, no such trust exists -- by browsing to a web site, you're letting whoever wrote that site run some code on your system. Since you (probably) don't trust them completely, what they can do in Javascript is restricted to a set of known safe actions. Loading DLLs is very much not in that set.

As generalhenry noted in a comment, there are some projects like emscripten to compile native code to Javascript, or Google Native Client to run sandboxed native code in the browser, but these technologies are still restricted in capabilities, and are pretty immature still. Ultimately, you will need to come to terms with the fact that code running in a browser is going to be limited.