This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
sp core library.environmenttype
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-core-library > EnvironmentType
Indicates the general type of environment where the SharePoint Framework is running.
Signature:
export declare enum EnvironmentType
Member | Value | Description |
---|---|---|
ClassicSharePoint | 3 |
Indicates that the framework was hosted by a classic server-rendered SharePoint page. Some functionality may be limited, e.g. various extensibility APIs may not be supported. |
Local | 1 |
Indicates that the SharePoint Framework is running on a page from a "localhost" web server, for example the SharePoint Workbench when hosted via "gulp serve". SharePoint REST API calls will not be available, and in general network access may not authenticate properly. Certain page context information may be using mock values for testing. |
SharePoint | 2 |
Indicates that the SharePoint Framework is running on a modern SharePoint web page, with full framework functionality. This is the normal usage scenario. |
Test | 0 |
Indicates that the SharePoint Framework is running inside a test harness, e.g. a unit test. There may be no user interaction at all, and network access in general may be disabled. |
This enum is used by the Environment.type property. It provides a way to distinguish environments where certain functionality may be limited or disabled.