initCallback won't be called
shotasenga opened this issue · 3 comments
shotasenga commented
It seems like some times the throttle()
(sizeIFrameThrottled()
) prevents init
event.
When the init
event was fired, the sizeIFrameThrottled()
postpone the event firing process. During the waiting time, if some other event occurred, the initial init
event was skipped. As a consequence, initCallback won't be called.
Steps
- load frame from the main page
- load iframreResizer.contentWindow.js in the frame
- modify content as soon as possible (In the test case below, I just put style tag on the bottom of the document.)
- the main page receives
iFrameResizer0:136:300:mutationObserver
event instead ofinit
I made a quick test case to reproduce the bag. http://shared.senta.me.s3-website-us-east-1.amazonaws.com/iframe-resizer-000/
My environment
- OS :: macOS High Sierra 10.13.2
- Browser :: Chrome 63.0.3239.132 (Official Build) (64-bit)
Thanks,
davidjbradshaw commented
Not seem that before. I guess init
should not be throttled. Would welcome a PR if you have the time to fix this.
shotasenga commented
I think I have the time to fix it later today (or weekend) I'll send a PR then.
davidjbradshaw commented
Fixed in v3.6.0