iframe 加载延迟
Delay in iframe load
iframeresizer 日志如下所示:
[iFrameSizer][Host page: glu] IFrame scrolling disabled for glu
iframeResizer.min.js:8[iFrameSizer][Host page: glu] [init] Sending msg to iframe[glu] (glu:8:false:true:32:true:true:null:lowestElement:null:null:0:true:parent:scroll) targetOrigin: *
iframeResizer.min.js:8 [iFrameSizer][Host page: glu] [iFrame.onload] Sending msg to iframe[glu] (glu:8:false:true:32:true:true:null:lowestElement:null:null:0:true:parent:scroll) targetOrigin: *
iframeResizer.contentWindow.min.js:9 [iFrameSizer][glu] Initialising iFrame (https://www.kultureshop.in/blog/about-ks/)
您会注意到主机页面向 hosted/iframe 页面发送了 2 条消息。第一个被忽略了。 iframe 页面对第二条消息做出了反应。
问题是第一条消息和第二条消息之间的时间间隔很大。
有谁知道主机页面脚本在将消息重新发送到 iframe 页面之前要等待多长时间?这能减少吗?
它在第一次运行时发送第一条消息,在加载 iFrame 的 onload 事件后发送第二条消息。如果您使用的是最新版本,iFrame 也会在准备好接收消息后向父页面发送消息。
iframeresizer 日志如下所示:
[iFrameSizer][Host page: glu] IFrame scrolling disabled for glu iframeResizer.min.js:8[iFrameSizer][Host page: glu] [init] Sending msg to iframe[glu] (glu:8:false:true:32:true:true:null:lowestElement:null:null:0:true:parent:scroll) targetOrigin: *
iframeResizer.min.js:8 [iFrameSizer][Host page: glu] [iFrame.onload] Sending msg to iframe[glu] (glu:8:false:true:32:true:true:null:lowestElement:null:null:0:true:parent:scroll) targetOrigin: *
iframeResizer.contentWindow.min.js:9 [iFrameSizer][glu] Initialising iFrame (https://www.kultureshop.in/blog/about-ks/)
您会注意到主机页面向 hosted/iframe 页面发送了 2 条消息。第一个被忽略了。 iframe 页面对第二条消息做出了反应。
问题是第一条消息和第二条消息之间的时间间隔很大。
有谁知道主机页面脚本在将消息重新发送到 iframe 页面之前要等待多长时间?这能减少吗?
它在第一次运行时发送第一条消息,在加载 iFrame 的 onload 事件后发送第二条消息。如果您使用的是最新版本,iFrame 也会在准备好接收消息后向父页面发送消息。