I'm creating an SharePoint app (add-in?). Now I'd like to get data from a list in my host web using CSOM/JavaScript:
var context = new SP.ClientContext(appWebUrl);
var factory = new SP.ProxyWebRequestExecutorFactory(appWebUrl);
context.set_webRequestExecutorFactory(factory);
var appContextSite = new SP.AppContextSite(context, hostUrl);
Problem is my SP object doesn't support the method ProxyWebRequestExecutorFactory (or so the debugger says)? SP.js is loaded and my client context object is initialized. Any ideas what is wrong?
My environment: SharePoint 2013 on-premise
webRequestExecutorFactory
at all and things still generally work... despite the examples provided on MSDN explicitly using the syntax you highlight. May be worth a shot