In https://html.spec.whatwg.org/#source-browsing-context it says that every navigation has a source browsing context, which is the browsing context responsible for starting the navigation.
Is it possible to define this further. Especially, if a navigation is triggered from a script, what is the source browsing context? The responsible browsing context of the entered settings object?