summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-07 14:05:47 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-08 01:50:59 -0800
commit18169cfd9bd3118f4c7c3b214482c912509288be (patch)
treeca24da9fef0b2c931581c635247932f2559909b3
parentd84597feec26d5c4e4cb1e1e0543e10e6bb61f80 (diff)
Do not update webviews that are not rendered.
-rw-r--r--CyteKit/WebViewController.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index 520faa2..4dc94ef 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -775,6 +775,9 @@ float CYScrollViewDecelerationRateNormal;
[preferences setJavaScriptCanOpenWindowsAutomatically:YES];
[preferences setOfflineWebApplicationCacheEnabled:YES];
+ if ([webview respondsToSelector:@selector(setShouldUpdateWhileOffscreen:)])
+ [webview setShouldUpdateWhileOffscreen:NO];
+
#if LogMessages
if ([document respondsToSelector:@selector(setAllowsMessaging:)])
[document setAllowsMessaging:YES];