PageSourceSearch

https://www.iltalehti.fi/assets/iframeResizer.862b3f002.chunk.js

js iltalehti.fi collected 2026-10-01 10:13:17 UTC 12,499 bytes, 2 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[9143],{10570(e,n){var i,t,o;!function(r){if("undefined"!=typeof window){var a,s=0,c=!1,d=!1,u="[iFrameSizer]",l=null,f=window.requestAnimationFrame,m={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},g={},w=null,h={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){M("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}},p={};window.jQuery&&((a=window.jQuery).fn?a.fn.iFrameResize||(a.fn.iFrameResize=function(e){return this.filter("iframe").each(function(n,i){L(i,e)}).end()}):I("","Unable to bind to jQuery, it is not fully loaded.")),t=[],(o="function"==typeof(i=U)?i.apply(n,t):i)===r||(e.exports=o),window.iFrameResize=window.iFrameResize||U()}function b(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function y(e,n,i){"addEventListener"in window?e.addEventListener(n,i,!1):"attachEvent"in window&&e.attachEvent("on"+n,i)}function v(e,n,i){"removeEventListener"in window?e.removeEventListener(n,i,!1):"detachEvent"in window&&e.detachEvent("on"+n,i)}function k(e){return g[e]?g[e].log:c}function F(e,n){x("log",e,n,k(e))}function I(e,n){x("info",e,n,k(e))}function M(e,n){x("warn",e,n,!0)}function x(e,n,i,t){!0===t&&"object"==typeof window.console&&console[e](function(e){return u+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),i)}function z(e){function n(){i("Height"),i("Width"),S(function(){P(h),T(b),c("resizedCallback",h)},h,"init")}function i(e){var n=Number(g[b]["max"+e]),i=Number(g[b]["min"+e]),t=e.toLowerCase(),o=Number(h[t]);F(b,"Checking "+t+" is in range "+i+"-"+n),o<i&&(o=i,F(b,"Set "+t+" to min value")),o>n&&(o=n,F(b,"Set "+t+" to max value")),h[t]=""+o}function t(e){return w.substr(w.indexOf(":")+7+e)}function o(e,n){var i,t;i=function(){var i,t;H("Send Page Info","pageInfo:"+(i=document.body.getBoundingClientRect(),t=h.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(t.top-i.top,10),offsetLeft:parseInt(t.left-i.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset})),e,n)},p[t=n]||(p[t]=setTimeout(function(){p[t]=null,i()},32))}function r(e){var n=e.getBoundingClientRect();return O(b),{x:Math.floor(Number(n.left)+Number(l.x)),y:Math.floor(Number(n.top)+Number(l.y))}}function a(e){var n=e?r(h.iframe):{x:0,y:0},i={x:Number(h.width)+n.x,y:Number(h.height)+n.y};F(b,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](i.x,i.y):M(b,"Unable to scroll to requested position, window.parentIFrame not found"):(l=i,s(),F(b,"--"))}function s(){!1!==c("scrollCallback",l)?T(b):N()}function c(e,n){return C(b,e,n)}var d,f,m,w=e.data,h={},b=null;"[iFrameResizerChild]Ready"===w?function(){for(var e in g)H("iFrame requested init",A(e),document.getElementById(e),e)}():u===(""+w).substr(0,13)&&w.substr(13).split(":")[0]in g?(m=w.substr(13).split(":"),h={iframe:g[m[0]]&&g[m[0]].iframe,id:m[0],height:m[1],width:m[2],type:m[3]},b=h.id,g[b]&&(g[b].loaded=!0),(f=h.type in{true:1,false:1,undefined:1})&&F(b,"Ignoring init message from meta parent page"),!f&&function(e){var n=!0;return g[e]||(n=!1,M(h.type+" No settings for "+e+". Message was: "+w)),n}(b)&&(F(b,"Received: "+w),d=!0,null===h.iframe&&(M(b,"IFrame ("+h.id+") not found"),d=!1),d&&function(){var n,i=e.origin,t=g[b]&&g[b].checkOrigin;if(t&&""+i!="null"&&!(t.constructor===Array?function(){var e=0,n=!1;for(F(b,"Checking connection is from allowed list of origins: "+t);e<t.length;e++)if(t[e]===i){n=!0;break}return n}():(n=g[b]&&g[b].remoteHost,F(b,"Checking connection is from: "+n),i===n)))throw new Error("Unexpected message received from: "+i+" for "+h.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(g[b]&&g[b].firstRun&&g[b]&&(g[b].firstRun=!1),h.t
1ype){case"close":g[b].closeRequestCallback?C(b,"closeRequestCallback",g[b].iframe):E(h.iframe);break;case"message":f=t(6),F(b,"MessageCallback passed: {iframe: "+h.iframe.id+", message: "+f+"}"),c("messageCallback",{iframe:h.iframe,message:JSON.parse(f)}),F(b,"--");break;case"scrollTo":a(!1);break;case"scrollToOffset":a(!0);break;case"pageInfo":o(g[b]&&g[b].iframe,b),function(){function e(e,t){function r(){g[i]?o(g[i].iframe,i):n()}["scroll","resize"].forEach(function(n){F(i,e+n+" listener for sendPageInfo"),t(window,n,r)})}function n(){e("Remove ",v)}var i=b;e("Add ",y),g[i]&&(g[i].stopPageInfo=n)}();break;case"pageInfoStop":g[b]&&g[b].stopPageInfo&&(g[b].stopPageInfo(),delete g[b].stopPageInfo);break;case"inPageLink":i=t(9).split("#")[1]||"",d=decodeURIComponent(i),(u=document.getElementById(d)||document.getElementsByName(d)[0])?(e=r(u),F(b,"Moving to in page link (#"+i+") at x: "+e.x+" y: "+e.y),l={x:e.x,y:e.y},s(),F(b,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(i):F(b,"In page link #"+i+" not found and window.parentIFrame not found"):F(b,"In page link #"+i+" not found");break;case"reset":W(h);break;case"init":n(),c("initCallback",h.iframe);break;default:n()}var e,i,d,u,f}())):I(b,"Ignored: "+w)}function C(e,n,i){var t=null,o=null;if(g[e]){if("function"!=typeof(t=g[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=t(i)}return o}function R(e){var n=e.id;delete g[n]}function E(e){var n=e.id;F(n,"Removing iFrame: "+n);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){}C(n,"closedCallback",n),F(n,"--"),R(e)}function O(e){null===l&&F(e,"Get page position: "+(l={x:window.pageXOffset!==r?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==r?window.pageYOffset:document.documentElement.scrollTop}).x+","+l.y)}function T(e){null!==l&&(window.scrollTo(l.x,l.y),F(e,"Set page position: "+l.x+","+l.y),N())}function N(){l=null}function W(e){F(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),O(e.id),S(function(){P(e),H("reset","reset",e.iframe,e.id)},e,"reset")}function P(e){function n(n){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",F(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):F("undefined","messageData id not set")}(n),function(n){d||"0"!==e[n]||(d=!0,F(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){function e(e){function n(n){return"0px"===(g[e]&&g[e].iframe.style[n])}g[e]&&null!==g[e].iframe.offsetParent&&(n("height")||n("width"))&&H("Visibility change","resize",g[e].iframe,e)}for(var n in g)e(n)}function n(n){F("window","Mutation observed: "+n[0].target+" "+n[0].type),q(e,16)}var i,t=b();t&&(i=document.querySelector("body"),new t(n).observe(i,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}(n)}var i=e.iframe.id;g[i]&&(g[i].sizeHeight&&n("height"),g[i].sizeWidth&&n("width"))}function S(e,n,i){i!==n.type&&f?(F(n.id,"Requesting animation frame"),f(e)):e()}function H(e,n,i,t,o){var r,a=!1;t=t||i.id,g[t]&&(i&&"contentWindow"in i&&null!==i.contentWindow?(r=g[t]&&g[t].targetOrigin,F(t,"["+e+"] Sending msg to iframe["+t+"] ("+n+") targetOrigin: "+r),i.contentWindow.postMessage(u+n,r)):M(t,"["+e+"] IFrame("+t+") not found"),o&&g[t]&&g[t].warningTimeout&&(g[t].msgTimeout=setTimeout(function(){!g[t]||g[t].loaded||a||(a=!0,M(t,"IFrame has not responded within "+g[t].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},g[t].warningTimeout)))}function A(e){return e+":"+g[e].bodyMarginV1+":"+g[e].sizeWidth+":"+g[e].log+":"+g[e].interval+":"+g[e].enablePublicMethods+":"+g[e].autoResize+":"+g[e].bodyMargin+":"+g[e].heightCalculationMethod+":"+g[e].bodyBackground+":"+g[e].bodyPadding+":"+g[e].tolerance+":"+g[e].inPageLinks+":"+g[e].resizeFrom+":"+g[e].widthCalculationMethod}function L(e,n){var i,t,o=function(i){var t;return""===i&&(e.id=(t=n&&n.id||h.id+s++,null!==document.getElementById(t)&&(t+=s++),i=t),c=(n||{}).log,F(i,"Added missing iframe ID: "+i+" ("+e.src+")")),i}(e.id);o in g&&"iFrameResizer"in e?M(o,"Ignored iFrame, already setup."):(function(n){var i;n=n||{},g[o]={firstRun:!0,iframe:e,remoteHost:e.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(n),function(e){for(var n in h)h.hasOwnProperty(n)&&(g[o][n]=e.hasOwnProperty(n)?e[n]:h[n])}(n),g[o]&&(g[o].targetOrigin=!0===g[o].checkOrigin?""===(i=g[o].remoteHost)||"file://"===i?"*":i:"*")}
1(n),function(){switch(F(o,"IFrame scrolling "+(g[o]&&g[o].scrolling?"enabled":"disabled")+" for "+o),e.style.overflow=!1===(g[o]&&g[o].scrolling)?"hidden":"auto",g[o]&&g[o].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=g[o]?g[o].scrolling:"no"}}(),function(){function n(n){1/0!==g[o][n]&&0!==g[o][n]&&(e.style[n]=g[o][n]+"px",F(o,"Set "+n+" = "+g[o][n]+"px"))}function i(e){if(g[o]["min"+e]>g[o]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}i("Height"),i("Width"),n("maxHeight"),n("minHeight"),n("maxWidth"),n("minWidth")}(),"number"!=typeof(g[o]&&g[o].bodyMargin)&&"0"!==(g[o]&&g[o].bodyMargin)||(g[o].bodyMarginV1=g[o].bodyMargin,g[o].bodyMargin=g[o].bodyMargin+"px"),i=A(o),(t=b())&&function(n){e.parentNode&&new n(function(n){n.forEach(function(n){Array.prototype.slice.call(n.removedNodes).forEach(function(n){n===e&&E(e)})})}).observe(e.parentNode,{childList:!0})}(t),y(e,"load",function(){var n,t;H("iFrame.onload",i,e,r,!0),n=g[o]&&g[o].firstRun,t=g[o]&&g[o].heightCalculationMethod in m,!n&&t&&W({iframe:e,height:0,width:0,type:"init"})}),H("init",i,e,r,!0),Function.prototype.bind&&g[o]&&(g[o].iframe.iFrameResizer={close:E.bind(null,g[o].iframe),removeListeners:R.bind(null,g[o].iframe),resize:H.bind(null,"Window resize","resize",g[o].iframe),moveToAnchor:function(e){H("Move to anchor","moveToAnchor:"+e,g[o].iframe,o)},sendMessage:function(e){H("Send Message","message:"+(e=JSON.stringify(e)),g[o].iframe,o)}}))}function q(e,n){null===w&&(w=setTimeout(function(){w=null,e()},n))}function j(e){F("window","Trigger event: "+e),q(function(){V("Window "+e,"resize")},16)}function B(){"hidden"!==document.visibilityState&&(F("document","Trigger event: Visiblity change"),q(function(){V("Tab Visable","resize")},16))}function V(e,n){function i(e){return g[e]&&"parent"===g[e].resizeFrom&&g[e].autoResize&&!g[e].firstRun}for(var t in g)i(t)&&H(e,n,document.getElementById(t),t)}function U(){function e(e,i){i&&(function(){if(!i.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==i.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+i.tagName+">")}(),L(i,e),n.push(i))}var n;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!f;e+=1)f=window[n[e]+"RequestAnimationFrame"];f||F("setup","RequestAnimationFrame not supported")}(),y(window,"message",z),y(window,"resize",function(){j("resize")}),y(document,"visibilitychange",B),y(document,"-webkit-visibilitychange",B),y(window,"focusin",function(){j("focus")}),y(window,"focus",function(){j("focus")}),function(i,t){switch(n=[],function(e){e&&e.enablePublicMethods&&M("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof t){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(t||"iframe"),e.bind(r,i));break;case"object":e(i,t);break;default:throw new TypeError("Unexpected data type ("+typeof t+")")}return n}}}()}}]);
2//# sourceMappingURL=iframeResizer.862b3f002.chunk.js.map

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.