다음을 통해 공유


클라이언트

사용 중인 클라이언트, 클라이언트가 서버에 연결되어 있는지 여부 및 사용 중인 디바이스 종류를 결정하는 메서드에 대한 액세스를 제공합니다.

Syntax

context.client;

사용할 수 있는 대상

모델 기반 앱, 캔버스 앱 및 포털.

속성

disableScroll

구성 요소에 대한 스크롤 기능을 사용하지 않도록 설정합니다. 이 속성은 모델 기반 앱과 캔버스 앱 모두에서 지원됩니다.

형식: boolean

메서드

메서드 Description 사용할 수 있는 대상
getClient 스크립트가 실행 중인 클라이언트를 나타내는 값을 반환합니다. 모델 기반 및 캔버스 앱
getFormFactor 사용자가 사용 중인 디바이스의 종류에 대한 정보를 반환합니다. 모델 기반 및 캔버스 앱
isOffline 서버가 온라인인지 오프라인인지에 관계없이 정보를 반환합니다. 모델 기반 앱
isNetworkAvailable 네트워크를 사용할 수 있는지 여부에 대한 정보를 반환합니다. 모델 기반 앱

Example

private createHTMLTableElement(): HTMLTableElement {
    let tableElement: HTMLTableElement = document.createElement("table");
    tableElement.setAttribute("class", "SampleControlHtmlTable_HtmlTable");
    let key: string = "Example Method";
    let value: string = "Result";
    tableElement.appendChild(this.createHTMLTableRowElement(key, value, true));
    key = "getFormFactor()";
    value = String(this._context.client.getFormFactor());
    tableElement.appendChild(this.createHTMLTableRowElement(key, value, false));
    key = "getClient()";
    value = String(this._context.client.getClient());
    tableElement.appendChild(this.createHTMLTableRowElement(key, value, false));
}

Power Apps 구성 요소 프레임워크 API 참조
Power Apps 구성 요소 프레임워크 개요