Skip to content

SharePoint page context object for classic and modern pages

License

Notifications You must be signed in to change notification settings

tomaszoida/sppagecontextinfo

Repository files navigation

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

About

SharePoint page context object for classic and modern pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published