adium 5423:30446d4b7b9f: Add a short delay to the contentAdded e...
commits at adium.im
commits at adium.im
Tue Apr 16 20:34:21 UTC 2013
details: http://hg.adium.im/adium/rev/30446d4b7b9f
revision: 5423:30446d4b7b9f
branch: JSXtras
author: Thijs Alkemade <me at thijsalkema.de>
date: Tue Apr 16 22:33:54 2013 +0200
Add a short delay to the contentAdded event, to ensure it's run after the content has been appended.
diffs (17 lines):
diff -r 3cd596256677 -r 30446d4b7b9f Plugins/WebKit Message View/AIWebKitMessageViewController.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewController.m Tue Apr 16 20:33:19 2013 +0200
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewController.m Tue Apr 16 22:33:54 2013 +0200
@@ -656,9 +656,11 @@
if (objectsAdded > 0) {
[webView stringByEvaluatingJavaScriptFromString:
- @"var evt = document.createEvent(\"Event\");\n"
+ @"window.setTimeout(function () {\n"
+ @"var evt = document.createEvent(\"Event\");\n"
@"evt.initEvent(\"contentAdded\", true, true);\n"
- @"document.dispatchEvent(evt);"];
+ @"document.dispatchEvent(evt);"
+ @"}, 100);"];
}
//If there is still content to process (the webview wasn't ready), we'll try again after a brief delay
More information about the commits
mailing list