{ "id": "174101", "key": "TIMOB-27449", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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-09-05T14:08:32.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-07T22:02:09.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": [], "description": "Since the adoption of WKWebView as a replacement for UIWebView, the \"load\" event no longer is triggered after the html property is set.\r\nThis happens as a consequence of {{[(TiUIWebViewProxy *)[self proxy] refreshHTMLContent]}} executing asynchronously , right before the event is fired.\r\n\r\n{code:java}\r\n- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation\r\n{\r\n [self _cleanupLoadingIndicator];\r\n [(TiUIWebViewProxy *)[self proxy] refreshHTMLContent]; //this might not be ready before the event is fired\r\n\r\n if ([[self proxy] _hasListeners:@\"load\"]) {\r\n [[self proxy] fireEvent:@\"load\" withObject:@{ @\"url\" : webView.URL.absoluteString, @\"title\" : webView.title }];\r\n }\r\n}\r\n{code}\r\nMy suggestion is to provide a completion handler argument to {{TiUIWebViewProxy refreshHTMLContent}} and fire the event from there. I can provide a PR if needed.\r\nNot having the html property set before the load event breaks the behaviour from TiUIWebView.\r\n", "attachment": [], "flagged": false, "summary": "iOS WebView html property not set before the \"load\" event is fired", "creator": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 8.x", "comment": { "comments": [ { "id": "451340", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~rlustemberg] Thanks for raising the issue. PR with test case is always appreciated :). Thanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-12T19:24:24.000+0000", "updated": "2019-09-12T19:24:24.000+0000" }, { "id": "451498", "author": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "I've missed your reply. I'll do that shortly ", "updateAuthor": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-09-19T12:50:09.000+0000", "updated": "2019-09-19T12:50:09.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }