The difference between sp.js and sp.runtime.js is
When you use JSOM, import the following libraries in the specified order.
- SP.js includes the SharePoint object modal references, such as web, lists, client context (which is used for representing the context of SharePoint Objects and operations), etc. It provides the types and members similar to the server object model namespace Microsoft.SharePoint to work with top-level sites, sub-sites and their lists and libraries.
- SP.Runtime.js includes the details between client and server communication. It contains the runtime object of JavaScript and encapsulate all classes of client object model and the server interaction.
When you use JSOM, import the following libraries in the specified order.
- ASP.NET Ajax library
- sp.runtime.js
- sp.js
No comments:
Post a Comment