Dislike the guess about first child is iframe.
Use <code>WindowManager.getRunningApps()[currentSheet.origin].iframe;</code> at least.

Also the origin reference is not a good pattern to widely use, but I cannot say when it's gone now.