{ "id": "133121", "key": "AC-829", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-07-15T16:47:51.000+0000", "created": "2014-07-14T13:56:42.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:06.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Using the kitchensink example /etc/local_webview.html this issue can be reproduced:\r\n\r\nVersion 1: use url property:\r\n{noformat}\r\nvar web=Ti.UI.createWebView({});\r\nweb.url='/etc/local_webview_test.html';\r\n{noformat}\r\nresult: the \"foo\" div text changes from \"hello\" to \"Click Me to Hide the Toolbar\". Also all Ti.API.info messages are shown.\r\n\r\nversion 2: use html property:\r\n{noformat}\r\nvar web=Ti.UI.createWebView({});\r\nvar file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \" /etc/local_webview.html\");\r\nvar blob = file.read();\r\nvar readText = blob.text;\r\nfile = null;\r\nblob = null;\r\nweb.html=readText;\r\n{noformat}\r\n\r\nresult: javascript not executed, events not fired, Ti.API.info not shown.\r\n\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "setting webview using html property does not run javascript in html", "creator": { "name": "rvwoens", "key": "rvwoens", "displayName": "Ronald van Woensel", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rvwoens", "key": "rvwoens", "displayName": "Ronald van Woensel", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.2.3 GA", "comment": { "comments": [ { "id": "314102", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi,\r\nWe have tested this kitchensink example. It’s not a bug. Web view html property works as expected. \r\n\r\nh3.Testing Environment:\r\nTitanium SDK: 3.2.3.GA,3.3.0.RC\r\nTitanium CLI: 3.3.0 –rc,\r\nAndroid SDK: 4.2.2,4.4.2,\r\niOS SDK: 7.1\r\nOS X Version: 10.9.3,\r\nAppcelerator Studio: 3.2.3\r\n\r\nh3.Step to Test:\r\n 1. Create a Classic project.\r\n 2. Paste this code in app.js file, local_webview.html file and jquery-1.3.2.js .\r\n 3. Run this code with the testing environment.\r\n\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({});\r\nvar web = Ti.UI.createWebView({});\r\nvar file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"local_webview.html\");\r\nvar blob = file.read();\r\nvar readText = blob.text;\r\nfile = null;\r\nblob = null;\r\nweb.html = readText;\r\nwin.add(web);\r\nwin.open();\r\n\r\n{code}\r\n{code:title=local_webview.html}\r\n\r\n\r\n
\r\n\t