Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 547 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 547 Bytes

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);
});