[AC-829] setting webview using html property does not run javascript in html
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-07-15T16:47:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Ronald van Woensel |
Assignee | Mauro Parra-Miranda |
Created | 2014-07-14T13:56:42.000+0000 |
Updated | 2016-03-08T07:37:06.000+0000 |
Description
Using the kitchensink example /etc/local_webview.html this issue can be reproduced:
Version 1: use url property:
{noformat}
var web=Ti.UI.createWebView({});
web.url='/etc/local_webview_test.html';
{noformat}
result: the "foo" div text changes from "hello" to "Click Me to Hide the Toolbar". Also all Ti.API.info messages are shown.
version 2: use html property:
{noformat}
var web=Ti.UI.createWebView({});
var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, " /etc/local_webview.html");
var blob = file.read();
var readText = blob.text;
file = null;
blob = null;
web.html=readText;
{noformat}
result: javascript not executed, events not fired, Ti.API.info not shown.
Hi, We have tested this kitchensink example. It’s not a bug. Web view html property works as expected.
Testing Environment:
Titanium SDK: 3.2.3.GA,3.3.0.RC Titanium CLI: 3.3.0 –rc, Android SDK: 4.2.2,4.4.2, iOS SDK: 7.1 OS X Version: 10.9.3, Appcelerator Studio: 3.2.3Step to Test:
1. Create a Classic project. 2. Paste this code in app.js file, local_webview.html file and jquery-1.3.2.js . 3. Run this code with the testing environment.Thanks.
Not a bug. Please check previous comment.