Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1218] Ti/Titanium in webviews

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T02:46:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsfireevent, ti, titanium, webview
Reporterwallneradam
AssigneeReggie Seagraves
Created2011-04-15T02:46:53.000+0000
Updated2017-03-09T21:24:44.000+0000

Description

I have the following codes:

app.js:

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

local.js:

function webFunc(){
document.getElementById('t').innerHTML = 'click2';
Titanium.App.fireEvent('testEvent');
}

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

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

Comments

  1. wallneradam 2011-04-15

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

  2. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source