mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
WebController: Set JS Controller after reloading the view
The WebKit delegate method didStartProvisionalLoadForFrame: is not called when reloading the frame. This caused the webviews to appear empty. We fix it by using a delegate method which is called each reload, as suggested by weinig in #webkit. This fixes Lighthouse bug #81.
This commit is contained in:
committed by
Pieter de Bie
parent
28127626c1
commit
67d9ff3262
+1
-1
@@ -54,7 +54,7 @@
|
||||
|
||||
# pragma mark Delegate methods
|
||||
|
||||
- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame
|
||||
- (void)webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame
|
||||
{
|
||||
id script = [view windowScriptObject];
|
||||
[script setValue: self forKey:@"Controller"];
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
- (void) didLoad
|
||||
{
|
||||
currentSha = @"";
|
||||
[self changeContentTo: historyController.webCommit];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user