sppagecontextinfo
v1.0.7
Published
_spPageContextInfo object for SharePoint classic and modern sites
Downloads
7
Maintainers
Readme
sppagecontextinfo
SharePoint page context object for classic and modern pages
Description
This package allows you to access useful SharePoint page context info object no matter if it is classic or modern site.
Installation
npm i sppagecontextinfo
Usage
Use SPPageContextInfo.get method to access _spPageContextInfo object. Context object is returned asynchronously with Promise.
import { SPPageContextInfo } from 'sppagecontextinfo';
SPPageContextInfo.getContext().then(context=>{
console.log(context.webAbsoluteUrl);
});