{ "id": "61850", "key": "TIMOB-1218", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T02:46:54.000+0000", "created": "2011-04-15T02:46:53.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "fireevent", "ti", "titanium", "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T21:24:44.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": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

I have the following codes:

\n

app.js:

\n
\nvar w = Ti.UI.createWindow();\nTi.App.addEventListener('testEvent', function(e) {\n    Ti.Api.info('testEvent');\n});\nwv = Ti.UI.createWebView({\n    html: '<html><head><script type=\"text/javascript\" src=\"/local.js\"></script></head><body><a id=\"t\" onclick=\"webFunc();\" href=\"#\" >click</a></body>'\n});\nw.add(wv);\nw.open();\n
\n

local.js:

\n
\nfunction webFunc(){\ndocument.getElementById('t').innerHTML = 'click2';\nTitanium.App.fireEvent('testEvent');\n}\n
\n

TestEvent will never occur, while the link is become\n'click2'.

\n

This technique worked in 1.2.0 maybe 1.3.0 (I can't test it\nnow).

{html}", "attachment": [], "flagged": false, "summary": "Ti/Titanium in webviews", "creator": { "name": "wallneradam", "key": "wallneradam", "displayName": "wallneradam", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wallneradam", "key": "wallneradam", "displayName": "wallneradam", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125095", "author": { "name": "wallneradam", "key": "wallneradam", "displayName": "wallneradam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Sorry, it was my fault. It is not a bug, only misspelled Ti.API\nas Ti.Api...

{html}", "updateAuthor": { "name": "wallneradam", "key": "wallneradam", "displayName": "wallneradam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:46:54.000+0000", "updated": "2011-04-15T02:46:54.000+0000" }, { "id": "410559", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T21:24:44.000+0000", "updated": "2017-03-09T21:24:44.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }