MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / getFrameByEvent

Function getFrameByEvent

scripts/smoothScroll.js:263–268  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

261 }
262 }
263 function getFrameByEvent(event) {
264 let iframes = document.getElementsByTagName("iframe");
265 return [].filter.call(iframes, function (iframe) {
266 return iframe.contentWindow === event.source;
267 })[0];
268 }
269 /**
270 * Removes event listeners and other traces left on the page.
271 */

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected