If you want to use the new WebKit JavaScript engine called SquirrelFish that interprets JavaScript three times faster than Safari 3.1 and 38 % faster than Google's Chrome JavaScript engine, you can download the nightly builds and install it under Mac Os X and Windows.
There are four interesting videos using the MobileScript Engine. Allowing developers write easy code to access every phone function. All these widgets has been developed using HTML and JavaScript. These demos are running on a Windows Mobile phone. An interesting video is Virtual Desktop, a entire phone interface that integrate web 2.0 services allowing users make a relation between the phone data and the internet data. The services used by these interface are Google Maps, Weather Bug, Flickr and Facebook. Also you can view profiles into the same interface, for example if you are in away profile the phone shows where you are and the weather for this city. Enjoy these videos, and please left a comment telling what you think.
These software was implemented between two Vodafone R&D Locations : Newbury (UK) and Huesca (Spain).
If you want to execute JavaScript from C++ to Internet Explorer, please read this interesting link. It could be very usefull if you want to do any javascript extension. Te source code sample is for Visual C++. And you must to do it with Active X.
If you want to extend the DOM for JavaScript and use it with any browser, you can use the JNEXT Framework, an Open Source project that allow us to develop our own extension. For example if you want to use your librarythrough JS you only need to develop the wrapper following the JNEXT instructions. The architecture is very easy and with a little c++ knowledge you can do it. you can download the entire source code from the next link