Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/ext/background.js

Issue 29373683: Issue 4775 - Perform callback after options page loaded (Closed)
Patch Set: Created Jan. 28, 2017, 12:30 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
diff --git a/chrome/ext/background.js b/chrome/ext/background.js
index 8cec8296408b0cafb5452c7eb0afb6e67d59035b..7d751930c9cd9f3861debf503dfa25e43cc14db2 100644
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -549,10 +549,10 @@
{
if (tabs.length > 0)
{
- window.setTimeout(() =>
- {
+ if (tabs[0].status == "complete")
callback(new Page(tabs[0]));
- });
+ else
+ afterTabLoaded(callback)(tabs[0]);
}
});
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld