Skip to content

Commit 916cd94

Browse files
authored
Merge pull request #11 from luwes/fix-type-error
Fix type error
2 parents 0be822b + 4cf75b2 commit 916cd94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const CSS = 'position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1p
33
export default (element, handler) => {
44
let frame = document.createElement('iframe');
55
frame.style.cssText = CSS;
6+
frame.onload = () => frame.contentWindow.onresize = () => handler(element);
67
element.appendChild(frame);
7-
frame.contentWindow.onresize = () => { handler(element); };
88
return frame;
99
}

0 commit comments

Comments
 (0)