默认不载入面积较大的 <iframe> 元素,减免一部分不必要的资源消耗。不是 lazyload;点击按钮(而不是点击 <iframe> 的任意位置)才会加载,以免误触。
当前为
will ignore that:
srcdoc attributesrc attributesrc attribute is not a valid URLsrc attribute:
"null", and/or"https:" or "http:""about:blank", "javascript:*" or "data:*")Just modify the code to change the behavior. If you need a lazyload version, but can't code it yourself, I'm glad to say now you can do this by just set loading=lazy attribute to the <iframe> (and <img>) elements, for the newest modern browsers:
And there are some lazyload libs for reference, for older browsers. Here is one of them: