1
0
Fork 0
forked from 0x2620/oxjs

keep parent and iframe from sending init messages indefinitely

This commit is contained in:
rlx 2014-09-26 11:29:14 +02:00
commit 5424023903
2 changed files with 11 additions and 5 deletions

View file

@ -132,8 +132,11 @@
load: function init() {
if (that.attr('src')) {
// send oxid to iframe
that.postMessage({init: {oxid: that.oxid}});
self.initTimeout = setTimeout(init, 250);
that.postMessage({init: {oxid: that.oxid}});
self.initTime = self.initTime || new Date();
if (new Date() < self.initTime + 60000) {
self.initTimeout = setTimeout(init, 250);
}
}
}
}).bindEvent({