stagewebview calling local javascript
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).
精彩评论