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