开发者

stagewebview calling local javascript

开发者 https://www.devze.com 2023-03-22 18:04 出处:网络
friends. I\'m currently developing a flex mobile project. I currently need to load local javascript using stagewebview. Like:

friends.

I'm currently developing a flex mobile project. I currently need to load local javascript using stagewebview. Like:

var str:String = '<head>'+
 开发者_StackOverflow中文版                '<script src="myLocalJs.js"/>'+
                 '</head><body>...</body>';
webView:StageWebView = new StageWebView();
webView.loadString(str);

Is there any way to load local javascript using StageWebView? I'm not expecting an answer like 'There is a project called StageWebViewBridge' since it does't have all the features I need. THX!!


you can use StageWebViewBridge to do this.... see how at http://code.google.com/p/stagewebviewbridge/

THX!!!


Due to security constraints the StageWebView cannot access local content (like using the file://).

You can however specify a js with a web address or inject the javascript itself as plaintext (rather than a .js file).

0

精彩评论

暂无评论...
验证码 换一张
取 消