4

Execute func:

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () { console.log("Initiating SP.ClientContext") });

ExecuteOrDelayUntilScriptLoaded:

SP.SOD.executeOrDelayUntilScriptLoaded(someFunction,"sp.js");
6

ExecuteOrDelayUntilScriptLoaded only works with scripts which are loaded by default on the page (OnDemand=False). Its sole purpose is to make sure that the function is called only after the script has completed loading. executeFunc works with scripts which are not loaded on the page by default (OnDemand=True). Its job is to load the mentioned script on the page and then call the function.

  • 1
    What is this concept of OnDemand? – variable Apr 23 '14 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.