Class ClientContext

Hierarchy

Index

Constructor methods

Methods

Constructor methods

constructor(serverRelativeUrlOrFullUrl: string): ClientContext

Parameters

  • serverRelativeUrlOrFullUrl: string

Returns

ClientContext

constructor(): ClientContext

Returns

ClientContext

Methods

public addQuery(query: ClientAction)

Parameters

public addQueryIdAndResultObject(id: number, obj: any)

Parameters

  • id: number
  • obj: any

public add_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.ClientRequestEventArgs) => void

public add_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.WebRequestEventArgs) => void

public add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void

public add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void

public castTo(obj: ClientObject, type: any): ClientObject

Parameters

Returns

ClientObject

public dispose()

public executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void, failedCallback: (sender: any, args: SP.ClientRequestFailedEventArgs) => void)

Parameters

  • succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void
  • failedCallback: (sender: any, args: SP.ClientRequestFailedEventArgs) => void

public executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void)

Parameters

  • succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void

public executeQueryAsync()

public get_applicationName(): string

Returns

string

public get_clientTag(): string

Returns

string

public static get_current(): ClientContext

Returns

ClientContext

public get_formDigestHandlingEnabled(): boolean

Returns

boolean

public get_hasPendingRequest(): boolean

Returns

boolean

public get_pendingRequest(): ClientRequest

Returns

ClientRequest

public get_requestTimeout(): number

Returns

number

public get_serverLibraryVersion(): string

Returns

string

public get_serverSchemaVersion(): string

Returns

string

public get_serverVersion(): string

Returns

string

public get_site(): Site

Returns

Site

public get_staticObjects(): any

Returns

any

public get_traceCorrelationId(): string

Returns

string

public get_url(): string

Returns

string

public get_viaUrl(): string

Returns

string

public get_web(): Web

Returns

Web

public get_webRequestExecutorFactory(): IWebRequestExecutorFactory

Returns

IWebRequestExecutorFactory

public load(clientObject: ClientObject)

Parameters

public load(clientObject: ClientObject, exps?: Array<string>)

Parameters

public loadQuery(clientObjectCollection: ClientObjectCollection, exp: string): any

Parameters

Returns

any

public loadQuery(clientObjectCollection: ClientObjectCollection): any

Parameters

Returns

any

public parseObjectFromJsonString(json: string): any

Parameters

  • json: string

Returns

any

public parseObjectFromJsonString(json: string, skipTypeFixup: boolean): any

Parameters

  • json: string
  • skipTypeFixup: boolean

Returns

any

public remove_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.ClientRequestEventArgs) => void

public remove_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.WebRequestEventArgs) => void

public remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void

public remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void)

Parameters

  • value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void

public set_applicationName(value: string)

Parameters

  • value: string

public set_clientTag(value: string)

Parameters

  • value: string

public set_formDigestHandlingEnabled(value: boolean)

Parameters

  • value: boolean

public set_requestTimeout(value: number)

Parameters

  • value: number

public set_traceCorrelationId(value: string)

Parameters

  • value: string

public set_viaUrl(value: string)

Parameters

  • value: string

public set_webRequestExecutorFactory(value: IWebRequestExecutorFactory)

Parameters