Every line of 'jquery set iframe src' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
243 function createIframe(src) { 244 document.getElementById('step4').innerHTML = ''; 245 }
62 function make_iframe(src) { 63 iframe = document.createElement("iframe"); 64 var root = get_root() 65 $(iframe).attr("src", root + src); 66 $(iframe).attr("width", "550"); 67 $(iframe).attr("height", "250"); 68 $(iframe).attr("frameborder", "0"); 69 $(iframe).attr("scrolling", "yes"); 70 return $(iframe).get(0).outerHTML; 71 }
166 function iframeOnload() { 167 // 移除提交数据用的表单和iframe 168 if (div.parentNode) { div.parentNode.removeChild(div); } 169 // 释放全局回调函数 170 if (callbackName) { base.deleteGlobalVar(callbackName); } 171 172 onload('success'); 173 }
37 function makeIframe(src) { 38 if (!src) throw new Error('meh') 39 const iframe = document.createElement('iframe') 40 iframe.hidden = true 41 iframe.src = src 42 iframe.loaded = false 43 iframe.name = 'iframe' 44 iframe.isIframe = true 45 iframe.postMessage = (...args) => iframe.contentWindow.postMessage(...args) 46 iframe.addEventListener('load', () => { 47 iframe.loaded = true 48 }, once) 49 document.body.appendChild(iframe) 50 return iframe 51 }
60 function setIframeHeight(id) { 61 var ifrm = document.getElementById(id); 62 var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document; 63 ifrm.style.visibility = 'hidden'; 64 ifrm.style.height = "10px"; // reset to minimal height ... 65 // IE opt. for bing/msn needs a bit added or scrollbar appears 66 ifrm.style.height = getDocHeight( doc ) + 4 + "px"; 67 ifrm.style.visibility = 'visible'; 68 }
17 function setIframeHeight(id, timeout) { 18 setTimeout(function() { 19 var ifrm = document.getElementById(id); 20 var doc = ifrm.contentDocument? ifrm.contentDocument: 21 ifrm.contentWindow.document; 22 ifrm.style.visibility = 'hidden'; 23 ifrm.style.height = "10px"; // reset to minimal height ... 24 // IE opt. for bing/msn needs a bit added or scrollbar appears 25 ifrm.style.height = getDocHeight( doc ) + 4 + "px"; 26 ifrm.style.visibility = 'visible'; 27 }, timeout) 28 }
24 export function createIframe(onIframeLoad) { 25 var iframe = document.createElement('iframe'); 26 iframe.class = 'react-playground-preview-iframe'; 27 iframe.src = 'about:blank'; 28 iframe.style.border = 'none'; 29 iframe.style.zIndex = 2147483647; 30 iframe.style.margin = 0; 31 iframe.style.padding = 0; 32 iframe.style.width = '100%'; 33 iframe.onload = onIframeLoad; 34 return iframe; 35 }
78 function isLoaded(iframe, callback) { 79 if (iframe.contentDocument.readyState !== 'complete') { 80 iframe.addEventListener('load', function() { 81 callback(); 82 }); 83 } else { 84 callback(); 85 } 86 }
180 function _updateIFrame(fqstate) { 181 var html, doc; 182 183 html = '' + 184 fqstate.replace(/&/g,'&'). 185 replace(//g,'>'). 186 replace(/"/g,'"') + 187 ''; 188 189 try { 190 doc = G._historyIFrame.get('contentWindow.document'); 191 // TODO: The Node API should expose these methods in the very near future... 192 doc.invoke('open'); 193 doc.invoke('write', html, '', '', '', ''); // see bug #2447937 194 doc.invoke('close'); 195 return true; 196 } catch (e) { 197 return false; 198 } 199 }
17 function loadjQuery(url, callback) { 18 var script_tag = document.createElement('script'); 19 script_tag.setAttribute("src", url) 20 script_tag.onload = callback; // Run callback once jQuery has loaded 21 script_tag.onreadystatechange = function () { // Same thing but for IE... bad for IE 10, it supports all 22 if (this.readyState == 'complete' || this.readyState == 'loaded') {callback();} 23 } 24 script_tag.onerror = function() { 25 loadjQuery("http://code.jquery.com/jquery-1.8.2.min.js", main); 26 } 27 document.getElementsByTagName("head")[0].appendChild(script_tag); 28 }