From 4a2751839f70dfd80066f9ae1d8593a05351a8e6 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 23 Sep 2014 23:58:53 +0200 Subject: [PATCH] only send init if iframe has src --- source/Ox.UI/js/Core/Element.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Core/Element.js b/source/Ox.UI/js/Core/Element.js index f195bf17..9cc9cf7a 100644 --- a/source/Ox.UI/js/Core/Element.js +++ b/source/Ox.UI/js/Core/Element.js @@ -130,9 +130,11 @@ self.messageCallbacks = self.messageCallbacks || {}; that.on({ load: function init() { - // send oxid to iframe - that.postMessage({init: {oxid: that.oxid}}); - self.initTimeout = setTimeout(init, 25); + if (that.attr('src')) { + // send oxid to iframe + that.postMessage({init: {oxid: that.oxid}}); + self.initTimeout = setTimeout(init, 250); + } } }).bindEvent({ init: function() {