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

Function startPageInfoMonitor

examples/assets/library/iframe.js:288–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286
287
288 function startPageInfoMonitor() {
289 function setListener(type,func) {
290 function sendPageInfo() {
291 if (settings[id]) {
292 sendPageInfoToIframe(settings[id].iframe,id);
293 } else {
294 stop();
295 }
296 }
297
298 ['scroll','resize'].forEach(function(evt) {
299 log(id, type + evt + ' listener for sendPageInfo');
300 func(window,evt,sendPageInfo);
301 });
302 }
303
304 function stop() {
305 setListener('Remove ', removeEventListener);
306 }
307
308 function start() {
309 setListener('Add ', addEventListener);
310 }
311
312 var id = iframeId; //Create locally scoped copy of iFrame ID
313
314 start();
315
316 if (settings[id]) {
317 settings[id].stopPageInfo = stop;
318 }
319 }
320
321 function stopPageInfoMonitor() {
322 if (settings[iframeId] && settings[iframeId].stopPageInfo) {

Callers 1

actionMsgFunction · 0.85

Calls 1

startFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…