[perf-web] Deal with multiple calls to window.onloaded()
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perf-web] Deal with multiple calls to window.onloaded()
- Date: Wed, 23 Jul 2014 00:37:43 +0000 (UTC)
commit ac23064bddda6223f5e7cc188f0abafc5f98c191
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Jun 29 13:42:32 2014 -0400
Deal with multiple calls to window.onloaded()
It seems like the loaded events gets fired multiple times; short-circuit
this out.
static/main.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/static/main.js b/static/main.js
index b87761e..d56d9c1 100644
--- a/static/main.js
+++ b/static/main.js
@@ -974,6 +974,9 @@ PerfDisplay.prototype.load = function() {
}
PerfDisplay.prototype.onWindowLoaded = function() {
+ if (this.windowLoaded)
+ return;
+
this.windowLoaded = true;
$( ".chart" ).each(function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]