EnvironmentType enum

Indicates the general type of environment where the SharePoint Framework is running.

Remarks

This enum is used by the Environment.type property. It provides a way to distinguish environments where certain functionality may be limited or disabled.

Fields

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.