Problem description
On Mobileweb, an Application Error is raised if using JSON.stringify and passing an object defined in the Views .xml part.
Steps to reproduce
1. Run the following sample code on Mobileweb:
function doClick(e) {
alert($.label.text);
}
Ti.API.info('#### ' + JSON.stringify($.label));
$.index.open();
<Alloy>
<Window class="container">
<Label class='mainLabel' id="label" onClick="doClick"></Label>
</Window>
</Alloy>
Result: Application Error when running the app. Error message: "Uncaught TypeError: Converting circular structure to JSON at /index.html (line 37)". See screenshot attached.
Not reproducible on iOS and Android.
Reproducible with TiSDK 3.2.3.GA / Alloy 1.3.1.GA , so not a regression.
No comments