{ "id": "84228", "key": "TIMOB-6854", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2016-08-22T20:45:26.000+0000", "created": "2011-12-22T15:35:21.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:39:02.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": "h3.Feature Request\r\nFeature request for the \"load\" event which will tell us when the JavaScript parser has finished. This is available in other JavaScript engines, example: http://www.w3schools.com/js/js_events.asp . It should be the equivalent to the \"load\" event on webpage.", "attachment": [], "flagged": false, "summary": "iOS \"load\" event when the engine ends parsing the JavaScript code", "creator": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 5.0.1", "comment": { "comments": [ { "id": "177129", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "That event is meaningful in browser environment, but in my opinion has no sense in Titanium environment, since \"app.js\" is entrance point so application is loaded when \"app.js\" starts to execute. On the other hand, \"Ti.include\" and \"require\" are blocking operations. That means that JS code execution is blocked until included file is loaded and parsed and therefore there is no need to wait for \"load\" event.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-12-23T12:29:59.000+0000", "updated": "2011-12-23T12:29:59.000+0000" }, { "id": "177279", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There is a use case where 3rd party modules or other scripts may need to hook into a \"load\" event for other JS files.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T10:18:58.000+0000", "updated": "2011-12-27T10:18:58.000+0000" }, { "id": "393838", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I'm not sure if this ticket refers to exposing an event from the Titanium JavaScript environment or from the native Titanium module API.\r\n\r\nSince it references the \"load\" event in the context of web pages, I assume it means having a \"load\" event from the Titanium JavaScript environment.\r\n\r\nAs Ivan suggested, there is no point in having a \"load\" event since the {{app.js}} is executed right away. There is no DOM like a web page that takes time to load external scripts.\r\n\r\n{{Ti.include()}} has been deprecated, no need for a \"load\" event for that.\r\n\r\n{{require()}} is blocking and when it returns, that's when you know the module has been loaded. If you need an event to be emitted, then you will have to wrap {{require()}} and emit your own event.\r\n\r\nPerhaps in a future Titanium release we will have a module loader similar to Node.js where you can register/change module extension handlers and such.\r\n\r\nIf this ticket was meant to be about exposing a native API, then I ask we open another ticket specifically for that and include a valid use case.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-08-22T20:45:26.000+0000", "updated": "2016-08-22T20:45:26.000+0000" }, { "id": "415025", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:39:02.000+0000", "updated": "2017-03-22T21:39:02.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }