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');
|
var frame = document.createElement('iframe');
|
||||||
frame.style.cssText = CSS;
|
frame.style.cssText = CSS;
|
||||||
element.appendChild(frame);
|
element.appendChild(frame);
|
||||||
|
frame.onload = function () {
|
||||||
i.event.bind(frame.contentWindow, 'resize', handler);
|
i.event.bind(frame.contentWindow, 'resize', handler);
|
||||||
|
};
|
||||||
return frame;
|
return frame;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user