Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
181 views
in Technique[技术] by (71.8m points)

javascript - Using the sendJavascript() Phonegap

I know the question is highly general, and seem to be irrelevant. I myself know that this type of questions should not be asked here. But after researching for long, posting to the blogs of many Phonegap masters, I got no replies from them, I have now came to StackOverflow. So much so, that there are no documentation for this particular method anywhere on the Internet, neither in PhoneGap Docs, nor in Cordova Docs.

My question is very simple. I want to know, how to use the sendJavascript() in the DroidGap class or the Plugin class to call a function in Javascript.

I found this tutorial, but it is very obsolete and doesn't work with Phonegap 3.0. It would be very nice if someone suggest some modification in the tutorial, or some new approach.

I don't need the code, just tell me how to do it. I just need a skeleton

I posted a similar question, actually it is the original problem, to which I am looking the solution for.

Please suggest me something on this. I'll be very glad.


Edit 1: On searching to the deepest of Google, I found this first documentation of this creepy method. Here is the link

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The sendJavascript function is defined in CordovaWebView.

Each Cordova plugin has a webView property that should give you easy access to call the javascript function.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...