Make SP.SOD.executeFunc and SP.ClientContext Function Properly In SharePoint Online
Running the code above with a proper function implementation in executeOrDelayUntilScriptLoaded will work 100% of the time.
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () { console.log("Initiating SP.ClientContext") }); SP.SOD.executeOrDelayUntilScriptLoaded(someFunction,"sp.js");