Class: Grope::FrameLoadDelegate

Inherits:
NSObject
  • Object
show all
Defined in:
lib/grope/frame_load_delegate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#should_keep_runningObject

Returns the value of attribute should_keep_running.



3
4
5
# File 'lib/grope/frame_load_delegate.rb', line 3

def should_keep_running
  @should_keep_running
end

Instance Method Details

#terminateObject



24
25
26
# File 'lib/grope/frame_load_delegate.rb', line 24

def terminate
  self.should_keep_running = false
end

#timeout(webview) ⇒ Object



28
29
30
31
# File 'lib/grope/frame_load_delegate.rb', line 28

def timeout(webview)
  warn "timeout"
  terminate
end

#webView_didFailLoadWithError_forFrame(webview, error, frame) ⇒ Object Also known as: webView_didFailProvisionalLoadWithError_forFrame



5
6
7
# File 'lib/grope/frame_load_delegate.rb', line 5

def webView_didFailLoadWithError_forFrame(webview, error, frame)
  terminate
end

#webView_didFinishLoadForFrame(webview, frame) ⇒ Object



18
19
20
21
22
# File 'lib/grope/frame_load_delegate.rb', line 18

def webView_didFinishLoadForFrame(webview, frame)
  if frame == webview.mainFrame
    terminate
  end
end

#webView_didStartProvisionalLoadForFrame(webview, frame) ⇒ Object



10
11
12
# File 'lib/grope/frame_load_delegate.rb', line 10

def webView_didStartProvisionalLoadForFrame(webview, frame)
  self.should_keep_running = true
end

#webView_willPerformClientRedirectToURL_delay_fireDate_forFrame(webview, url, delay, date, frame) ⇒ Object



14
15
16
# File 'lib/grope/frame_load_delegate.rb', line 14

def webView_willPerformClientRedirectToURL_delay_fireDate_forFrame(webview, url, delay, date, frame)
  self.should_keep_running = true
end