1//HTML5 postMessage usage to ease embedding iframes from different domains 2//The page loaded in iframe needs to send postMessage("resize(w=WIDTH;h=HEIGHT)") to be resized. 3//Works in IE8+, FF3+, Opera 9.5+ and Chrome. 4 5var msgResize = function(e) 6{ 7 var m = /resize\(w=(\d+);h=(\d+)\)/.exec(e.data); 8 if (m) 9 { 10 var f = document.getElementsByTagName('iframe'); 11 for (var i = 0; i < f.length; i++) 12 { 13 if (f[i].contentWindow == e.source) 14 { 15 f[i].style.width = m[1]+'px'; 16 f[i].style.height = m[2]+'px'; 17 break; 18 } 19 } 20 } 21}; 22 23if (window.addEventListener) 24 window.addEventListener('message', msgResize, false); 25else if (window.attachEvent) 26 window.attachEvent('onmessage', msgResize);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.