I'm trying to Fire an event from a remote Webview with Alloy. Is this possible?
page.xml
<WebView url="http://remoteurl.com/page.html" scrollsToTop="true" height="auto" enableZoomControls="false" left="0" right="0"></WebView>page.html
<html> ... <a href="#" class="add-favoris">Add Favoris</a> <script> $(document).on('click', '.add-favoris', function(e){ e.preventDefault(); alert('ok favoris'); console.log(Ti); var Ti = window.parent.Ti; console.log(Ti); if(typeof Ti != 'undefined'){ var Ti = window.parent.Ti; Ti.App.fireEvent('addFavoris', {value:'ok'}); } }); ...Alloy.js
Titanium.App.addEventListener('addFavoris',function(e) { alert('worked'); });Ti return always undefined in my Titanium studio console and my event is not fired. Does it should work ? Thanks.