{ "id": "174074", "key": "TIMOB-27364", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": null, "resolutiondate": null, "created": "2019-08-29T13:45:33.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2019-09-02T09:32:04.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nSpec document: https://github.com/tc39/proposal-global\r\n\r\nI believe we will want to implement the globalThis proposal to ensure JS code written that uses this works in Titanium. \r\n\r\nIt is important to note that as it this is specced at the ECMAScript level our JS Engines (v8 and JSCore) will also implement this. Therefore we may wish to follow the polyfill outlined in that repo and ensure that we only define globalThis in environments where it is already defined\r\n\r\nv8 implemented in release 71 https://v8.dev/blog/v8-release-71\r\nIt looks like WebKit implemented in late 2018 https://bugs.webkit.org/show_bug.cgi?id=165171\r\n\r\nWe might be able to use [test262|https://github.com/tc39/test262] to verify our changes are spec compliant\r\n\r\nThis should be easy to add via the ti.main.js setup we have", "attachment": [], "flagged": false, "summary": "TiAPI: Support globalThis", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": null, "comment": { "comments": [ { "id": "451013", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Is this really required and requested by the users? I don't think anyone \"needs\" this right now. Besides, it worries me that the ti.main is filled with any kind of \"useful\" polyfills although approx. 1 % of all Titanium users actually need it. Especially iOS worries me, since Android can precompile that file but iOS can't. Please prioritize between the actual need and performance in real word apps.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-09-02T08:28:46.000+0000", "updated": "2019-09-02T08:28:46.000+0000" }, { "id": "451014", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~hknoechel], this was actually bought up on slack in the last few weeks. But this isn't a \"feature request\" per se, it's something we have to do to make sure we're tracking the standards compliance. If you're pulling in code from npm, it's possible that some of that code might be using globalThis", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-09-02T09:26:54.000+0000", "updated": "2019-09-02T09:26:54.000+0000" }, { "id": "451015", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Are there statistics on how many people actually use npm deps? And the performance impacts of the ti.main introduction since 7.5.0? This is very important for performance-critical apps.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-09-02T09:32:04.000+0000", "updated": "2019-09-02T09:32:04.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }