Hi,
what do you mean with "to run your code with phonegap not as native android or iphone but as js."?
Are you just running the app in a browser accessing it as file:/// ? That's not supported, see
http://www.lightstreamer.com/vb/showthread.php?t=903 for an alternate approach exploiting html5 offline application cache.
Anyway, the current html library (5.0) is unfortunately not compatible with phonegap.
On the other hand I have a prototype of the next html client library in its alpha stage that supports it (it also requires the next Lightstreamer server also in alpha stage).