Wait until load to bind the resize handler.
This commit is contained in:
@@ -16,7 +16,9 @@ module.exports = function (element) {
|
|||||||
var frame = document.createElement('iframe');
|
var frame = document.createElement('iframe');
|
||||||
frame.style.cssText = CSS;
|
frame.style.cssText = CSS;
|
||||||
element.appendChild(frame);
|
element.appendChild(frame);
|
||||||
i.event.bind(frame.contentWindow, 'resize', handler);
|
frame.onload = function () {
|
||||||
|
i.event.bind(frame.contentWindow, 'resize', handler);
|
||||||
|
};
|
||||||
return frame;
|
return frame;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user