I need to query a list located inside a SharePoint hosted app, when located on host web, using JavaScript (REST preferably).
I control both app and host.
It's possible to communicate with an app part using window.addEventListener('message', m => ...)
, but I need to load the data from several SPWebs, and the app part can't be added to all pages.
SP.AppContextSite
does not work, since host web does not have an app context.