MCPcopy
hub / github.com/Semantic-Org/Semantic-UI / readDataFromPage

Function readDataFromPage

examples/assets/library/iframe-content.js:206–236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

204 }
205
206 function readDataFromPage() {
207 function readData() {
208 var data = window.iFrameResizer;
209
210 log('Reading data from page: ' + JSON.stringify(data));
211
212 messageCallback = ('messageCallback' in data) ? data.messageCallback : messageCallback;
213 readyCallback = ('readyCallback' in data) ? data.readyCallback : readyCallback;
214 targetOriginDefault = ('targetOrigin' in data) ? data.targetOrigin : targetOriginDefault;
215 heightCalcMode = ('heightCalculationMethod' in data) ? data.heightCalculationMethod : heightCalcMode;
216 widthCalcMode = ('widthCalculationMethod' in data) ? data.widthCalculationMethod : widthCalcMode;
217 }
218
219 function setupCustomCalcMethods(calcMode, calcFunc) {
220 if ('function' === typeof calcMode) {
221 log('Setup custom ' + calcFunc + 'CalcMethod');
222 customCalcMethods[calcFunc] = calcMode;
223 calcMode = 'custom';
224 }
225
226 return calcMode;
227 }
228
229 if(('iFrameResizer' in window) && (Object === window.iFrameResizer.constructor)) {
230 readData();
231 heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height');
232 widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width');
233 }
234
235 log('TargetOrigin for parent set to: ' + targetOriginDefault);
236 }
237
238
239 function chkCSS(attr,value) {

Callers 1

initFunction · 0.85

Calls 3

readDataFunction · 0.85
setupCustomCalcMethodsFunction · 0.85
logFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…