Instead of using a framescript, change promiseFocus to use the SpecialPowers actor. In addition, promiseFocus may now take a browsing context to focus a specific subframe's window. If that subframe is deeply nested, messages will be passed back and forth between the parent and each successive subframe to get to the one subframe that is desired to be focused. Similarly, this process is used when focusing a higher level frame that already has its focused element set to a subframe.
Differential Revision: https://phabricator.services.mozilla.com/D116387