Execute func:

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



1 Answer 1


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, 2014 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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