无障碍子系统JS API变更


无障碍子系统JS API变更

OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,无障碍子系统的API变更如下:

接口变更

模块名 类名 方法/属性/枚举/常量 变更类型
ohos.accessibility EventInfo itemCount?: number; 新增
ohos.accessibility EventInfo endIndex?: number; 新增
ohos.accessibility EventInfo currentIndex?: number; 新增
ohos.accessibility EventInfo beginIndex?: number; 新增
ohos.accessibility EventInfo lastContent?: string; 新增
ohos.accessibility EventInfo contents?: Array; 新增
ohos.accessibility EventInfo textMoveUnit?: TextMoveUnit; 新增
ohos.accessibility EventInfo triggerAction: Action; 新增
ohos.accessibility EventInfo description?: string; 新增
ohos.accessibility EventInfo pageId ?: number; 新增
ohos.accessibility EventInfo componentType?: string; 新增
ohos.accessibility EventInfo bundleName: string; 新增
ohos.accessibility EventInfo windowUpdateType?: WindowUpdateType; 新增
ohos.accessibility EventInfo type: EventType; 新增
ohos.accessibility EventInfo constructor(jsonObject); 新增
ohos.accessibility AccessibilityAbilityInfo readonly eventTypes: Array; 新增
ohos.accessibility AccessibilityAbilityInfo readonly description: string; 新增
ohos.accessibility AccessibilityAbilityInfo readonly capabilities: Array; 新增
ohos.accessibility AccessibilityAbilityInfo readonly abilityTypes: Array; 新增
ohos.accessibility AccessibilityAbilityInfo readonly bundleName: string; 新增
ohos.accessibility AccessibilityAbilityInfo readonly name: string; 新增
ohos.accessibility AccessibilityAbilityInfo readonly id: string; 新增
ohos.accessibility CaptionsStyle windowColor: number | string; 新增
ohos.accessibility CaptionsStyle backgroundColor: number | string; 新增
ohos.accessibility CaptionsStyle fontEdgeType: CaptionsFontEdgeType; 新增
ohos.accessibility CaptionsStyle fontColor: number | string; 新增
ohos.accessibility CaptionsStyle fontScale: number; 新增
ohos.accessibility CaptionsStyle fontFamily: CaptionsFontFamily; 新增
ohos.accessibility CaptionsManager off(type: 'styleChange', callback?: Callback): void; 新增
ohos.accessibility CaptionsManager off(type: 'enableChange', callback?: Callback): void; 新增
ohos.accessibility CaptionsManager on(type: 'styleChange', callback: Callback): void; 新增
ohos.accessibility CaptionsManager on(type: 'enableChange', callback: Callback): void; 新增
ohos.accessibility CaptionsManager style: CaptionsStyle; 新增
ohos.accessibility CaptionsManager enabled: boolean; 新增
ohos.accessibility accessibility function getCaptionsManager(): CaptionsManager; 新增
ohos.accessibility accessibility function off(type: 'touchGuideStateChange', callback?: Callback): void; 新增
ohos.accessibility accessibility function off(type: 'accessibilityStateChange', callback?: Callback): void; 新增
ohos.accessibility accessibility function on(type: 'touchGuideStateChange', callback: Callback): void; 新增
ohos.accessibility accessibility function on(type: 'accessibilityStateChange', callback: Callback): void; 新增
ohos.accessibility accessibility function sendEvent(event: EventInfo, callback: AsyncCallback): void;
function sendEvent(event: EventInfo): Promise;
新增
ohos.accessibility accessibility function getAbilityLists(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback<Array>): void;
function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise<Array>;
新增
ohos.accessibility accessibility function isOpenTouchGuide(callback: AsyncCallback): void;
function isOpenTouchGuide(): Promise;
新增
ohos.accessibility accessibility function isOpenAccessibility(callback: AsyncCallback): void;
function isOpenAccessibility(): Promise;
新增