[TIMOB-16821] iOS/Android : Support window.location.search for local files in WebView
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.2.2 |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | querystring, webview |
| Reporter | Fokke Zandbergen |
| Assignee | Unknown |
| Created | 2014-04-03T11:44:35.000+0000 |
| Updated | 2018-02-28T20:03:10.000+0000 |
Description
If you load a local file into a webview like this:
var win = Ti.UI.createWindow();
win.add(Ti.UI.createWebView({
url: 'index.html?foo=bar'
}));
win.open();
The following index.html results in the attached screenshot, showing the query string is not found in window.location.search:
<html>
<body bgcolor="#ddd">
<pre id="dump" style="margin-top:20px" />
<script>
document.getElementById('dump').innerHTML = JSON.stringify(window.location, null, ' ');
</script>
</body>
</html>
This is unfortunate since I'd like to use the query string to pass parameters to the static HTML. I know I can wait for the WebView's load event and then evalJS, but my benchmarks show I loose a lot of valuable time this way.
Attachments
| File | Date | Size |
|---|---|---|
| iOS-simulatorschermafbeelding 3 apr. 2014 13.39.18.png | 2014-04-03T11:44:35.000+0000 | 53262 |
Moving this enhancement request to Engineering for further evaluation and prioritization.