LavaMoat / snow

Use Snow to finally secure your web app's same origin realms!
https://lavamoat.github.io/snow/demo/
MIT License
102 stars 9 forks source link

Make findWin function recursive #51

Closed weizman closed 1 year ago

weizman commented 1 year ago

Currently findWin only goes 1 level deep - for a window it gets, it goes through all frames underneath it, but not the frames underneath them.

This PR turns findWin into a recursive function, allowing it to always start from the top and go through all existing windows in the page (regardless of their depth level) until it finds its match.