1# JS API Changes of the ArkUI Development Framework 2 3The table below lists the APIs changes of the ArkUI development framework in OpenHarmony 3.2 Beta2 over OpenHarmony 3.2 Beta1. 4 5## API Changes 6 7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| 8|---|---|---|---| 9| ArkUI | AbilityComponentInterface | (want: Want): AbilityComponentAttribute; | Added| 10| ArkUI | AbilityComponentAttribute | onConnect(callback: () => void): AbilityComponentAttribute; | Added| 11| ArkUI | AbilityComponentAttribute | onDisconnect(callback: () => void): AbilityComponentAttribute; | Added| 12| ArkUI | HttpAuthHandler | isHttpAuthInfoSaved(): boolean; | Added| 13| ArkUI | HttpAuthHandler | cancel(): void; | Added| 14| ArkUI | HttpAuthHandler | confirm(userName: string, password: string): boolean; | Added| 15| ArkUI | HttpAuthHandler | constructor(); | Added| 16| ArkUI | HitTestValue | getExtra(): string; | Added| 17| ArkUI | HitTestValue | getType(): HitTestType; | Added| 18| ArkUI | HitTestValue | constructor(); | Added| 19| ArkUI | JsResult | handlePromptConfirm(result: string): void; | Added| 20| ArkUI | Resource | readonly moduleName: string; | Added| 21| ArkUI | Resource | readonly bundleName: string; | Added| 22| ArkUI | TextInputAttribute | textAlign(value: TextAlign): TextInputAttribute; | Added| 23| ArkUI | TextInputAttribute | showPasswordIcon(value: boolean): TextInputAttribute; | Added| 24| ArkUI | TextInputAttribute | copyOption(value: boolean \| CopyOption): TextInputAttribute; | Added| 25| ArkUI | InputType | PhoneNumber | Added| 26| ArkUI | TextAreaAttribute | copyOption(value: boolean \| CopyOption): TextAreaAttribute; | Added| 27| ArkUI | TextAttribute | copyOption(value: boolean \| CopyOption): TextAttribute; | Added| 28| ArkUI | SearchAttribute | textAlign(value: TextAlign): SearchAttribute; | Added| 29| ArkUI | SearchAttribute | copyOption(value: boolean \| CopyOption): SearchAttribute; | Added| 30| ArkUI | ScrollAttribute | onScrollBegin(event: (dx: number, dy: number) => { dxRemain: number, dyRemain: number }): ScrollAttribute; | Added| 31| ArkUI | Scroller | scrollBy(dx: Length, dy: Length); | Added| 32| ArkUI | RemoteWindowInterface | (target: WindowAnimationTarget): RemoteWindowAttribute; | Added| 33| ArkUI | WindowAnimationTarget | readonly windowBounds: RRect; | Added| 34| ArkUI | WindowAnimationTarget | readonly abilityName: string; | Added| 35| ArkUI | WindowAnimationTarget | readonly bundleName: string; | Added| 36| ArkUI | RRect | radius: number; | Added| 37| ArkUI | RRect | height: number; | Added| 38| ArkUI | RRect | width: number; | Added| 39| ArkUI | RRect | top: number; | Added| 40| ArkUI | RRect | left: number; | Added| 41| ArkUI | RelativeContainerInterface | (): RelativeContainerAttribute; | Added| 42| ArkUI | PluginComponentAttribute | onError(callback: (info: { errcode: number; msg: string }) => void): PluginComponentAttribute; | Added| 43| ArkUI | PluginComponentAttribute | onComplete(callback: () => void): PluginComponentAttribute; | Added| 44| ArkUI | PluginComponentInterface | (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; | Added| 45| ArkUI | PluginComponentTemplate | ability: string; | Added| 46| ArkUI | PluginComponentTemplate | source: string; | Added| 47| ArkUI | PatternLockAttribute | autoReset(value: boolean): PatternLockAttribute; | Added| 48| ArkUI | PatternLockAttribute | onPatternComplete(callback: (input: Array\<number>) => void): PatternLockAttribute; | Added| 49| ArkUI | PatternLockAttribute | pathStrokeWidth(value: number \| string): PatternLockAttribute; | Added| 50| ArkUI | PatternLockAttribute | pathColor(value: ResourceColor): PatternLockAttribute; | Added| 51| ArkUI | PatternLockAttribute | activeColor(value: ResourceColor): PatternLockAttribute; | Added| 52| ArkUI | PatternLockAttribute | selectedColor(value: ResourceColor): PatternLockAttribute; | Added| 53| ArkUI | PatternLockAttribute | regularColor(value: ResourceColor): PatternLockAttribute; | Added| 54| ArkUI | PatternLockAttribute | backgroundColor(value: ResourceColor): PatternLockAttribute; | Added| 55| ArkUI | PatternLockAttribute | circleRadius(value: Length): PatternLockAttribute; | Added| 56| ArkUI | PatternLockAttribute | sideLength(value: Length): PatternLockAttribute; | Added| 57| ArkUI | PatternLockInterface | (controller?: PatternLockController): PatternLockAttribute; | Added| 58| ArkUI | PatternLockController | reset(); | Added| 59| ArkUI | PatternLockController | constructor(); | Added| 60| ArkUI | ListAttribute | onScrollBegin(event: (dx: number, dy: number) => { dxRemain: number, dyRemain: number }): ListAttribute; | Added| 61| ArkUI | ListAttribute | alignListItem(value: ListItemAlign): ListAttribute; | Added| 62| ArkUI | ListAttribute | lanes(value: number \| LengthConstrain): ListAttribute; | Added| 63| ArkUI | ListItemAlign | End | Added| 64| ArkUI | ListItemAlign | Center | Added| 65| ArkUI | ListItemAlign | Start | Added| 66| ArkUI | ImageFrameInfo | duration?: number; | Added| 67| ArkUI | ImageFrameInfo | left?: number \| string; | Added| 68| ArkUI | ImageFrameInfo | top?: number \| string; | Added| 69| ArkUI | ImageFrameInfo | height?: number \| string; | Added| 70| ArkUI | ImageFrameInfo | width?: number \| string; | Added| 71| ArkUI | ImageFrameInfo | src: string \| Resource; | Added| 72| ArkUI | GridRowAttribute | onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute; | Added| 73| ArkUI | GridRowInterface | (optiion?: GridRowOptions): GridRowAttribute; | Added| 74| ArkUI | GridRowOptions | direction?: GridRowDirection; | Added| 75| ArkUI | GridRowOptions | breakpoints?: BreakPoints; | Added| 76| ArkUI | GridRowOptions | columns?: number \| GridRowColumnOption; | Added| 77| ArkUI | GridRowOptions | gutter?: Length \| GetterOption; | Added| 78| ArkUI | BreakPoints | reference?: BreakpointsReference, | Added| 79| ArkUI | BreakPoints | value?: Array\<string>, | Added| 80| ArkUI | GridRowDirection | RowReverse | Added| 81| ArkUI | GridRowDirection | Row | Added| 82| ArkUI | BreakpointsReference | ComponentSize | Added| 83| ArkUI | BreakpointsReference | WindowSize | Added| 84| ArkUI | GetterOption | y?: Length \| GridRowSizeOption | Added| 85| ArkUI | GetterOption | x?: Length \| GridRowSizeOption, | Added| 86| ArkUI | GridRowColumnOption | xxl?: number, | Added| 87| ArkUI | GridRowColumnOption | xl?: number, | Added| 88| ArkUI | GridRowColumnOption | lg?: number, | Added| 89| ArkUI | GridRowColumnOption | md?: number, | Added| 90| ArkUI | GridRowColumnOption | sm?: number, | Added| 91| ArkUI | GridRowColumnOption | xs?: number, | Added| 92| ArkUI | GridRowSizeOption | xxl?: Length, | Added| 93| ArkUI | GridRowSizeOption | xl?: Length, | Added| 94| ArkUI | GridRowSizeOption | lg?: Length, | Added| 95| ArkUI | GridRowSizeOption | md?: Length, | Added| 96| ArkUI | GridRowSizeOption | sm?: Length, | Added| 97| ArkUI | GridRowSizeOption | xs?: Length, | Added| 98| ArkUI | GridColAttribute | order(value: number \| GridColColumnOption): GridRowAttribute; | Added| 99| ArkUI | GridColAttribute | offset(value: number \| GridColColumnOption): GridRowAttribute; | Added| 100| ArkUI | GridColAttribute | span(value: number \| GridColColumnOption): GridRowAttribute; | Added| 101| ArkUI | GridColInterface | (optiion?: GridColOptions): GridColAttribute; | Added| 102| ArkUI | GridColOptions | order?: number \| GridColColumnOption; | Added| 103| ArkUI | GridColOptions | offset?: number \| GridColColumnOption; | Added| 104| ArkUI | GridColOptions | span?: number \| GridColColumnOption; | Added| 105| ArkUI | GridColColumnOption | xxl?: number, | Added| 106| ArkUI | GridColColumnOption | xl?: number, | Added| 107| ArkUI | GridColColumnOption | lg?: number, | Added| 108| ArkUI | GridColColumnOption | md?: number, | Added| 109| ArkUI | GridColColumnOption | sm?: number, | Added| 110| ArkUI | GridColColumnOption | xs?: number, | Added| 111| ArkUI | CopyOption | CrossDevice = 2 | Added| 112| ArkUI | CopyOption | LocalDevice = 1 | Added| 113| ArkUI | CopyOption | InApp = 0 | Added| 114| ArkUI | Placement | RightBottom | Added| 115| ArkUI | Placement | RightTop | Added| 116| ArkUI | Placement | LeftBottom | Added| 117| ArkUI | Placement | LeftTop | Added| 118| ArkUI | CommonMethod | onVisibleAreaChange(ratios: Array\<number>, event: (isVisible: boolean, currentRatio: number) => void): T; | Added| 119| ArkUI | CommonMethod | alignRules(value: AlignRuleOption): T; | Added| 120| ArkUI | CommonMethod | tabIndex(index: number): T; | Added| 121| ArkUI | CommonMethod | borderImage(value: BorderImageOption): T; | Added| 122| ArkUI | CommonMethod | backgroundBlurStyle(value: BlurStyle): T; | Added| 123| ArkUI | BorderImageOption | fill?: boolean | Added| 124| ArkUI | BorderImageOption | outset?: Length \| EdgeWidths, | Added| 125| ArkUI | BorderImageOption | width?: Length \| EdgeWidths, | Added| 126| ArkUI | BorderImageOption | source?: string \| Resource \| linearGradient, | Added| 127| ArkUI | BorderImageOption | repeat?: RepeatMode, | Added| 128| ArkUI | BorderImageOption | slice?: Length \| EdgeWidths, | Added| 129| ArkUI | BlurStyle | Thick | Added| 130| ArkUI | BlurStyle | Regular | Added| 131| ArkUI | BlurStyle | Thin | Added| 132| ArkUI | RepeatMode | Space | Added| 133| ArkUI | RepeatMode | Round | Added| 134| ArkUI | RepeatMode | Stretch | Added| 135| ArkUI | RepeatMode | Repeat | Added| 136| ArkUI | AlignRuleOption | center?: { anchor: string, align: VerticalAlign }; | Added| 137| ArkUI | AlignRuleOption | bottom?: { anchor: string, align: VerticalAlign }; | Added| 138| ArkUI | AlignRuleOption | top?: { anchor: string, align: VerticalAlign }; | Added| 139| ArkUI | AlignRuleOption | middle?: { anchor: string, align: HorizontalAlign }; | Added| 140| ArkUI | AlignRuleOption | right?: { anchor: string, align: HorizontalAlign }; | Added| 141| ArkUI | AlignRuleOption | left?: { anchor: string, align: HorizontalAlign }; | Added| 142| ArkUI | ICurve | interpolate(fraction : number) : number; | Added| 143| elementName | ElementName | moduleName?: string; | Added| 144| global | | function sendMouseEvent(event: MouseEvent): boolean; | Added| 145| global | | function sendKeyEvent(event: KeyEvent): boolean; | Added| 146| global | | function sendTouchEvent(event: TouchObject): boolean; | Added| 147| global | | function sendEventByKey(id: string, action: number, params: string): boolean; | Added| 148| global | | function getInspectorTree(): string; | Added| 149| global | | function getInspectorByKey(id: string): string; | Added| 150| ohos.curves | curves | function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; | Added| 151| ohos.curves | curves | function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; | Added| 152| ohos.curves | curves | function stepsCurve(count: number, end: boolean): ICurve; | Added| 153| ohos.curves | curves | function initCurve(curve?: Curve): ICurve; | Added| 154| ohos.curves | ICurve | interpolate(fraction : number) : number; | Added| 155| ohos.router | RouterMode | Single | Added| 156| ohos.router | RouterMode | Standard | Added| 157| ohos.uiAppearance | uiAppearance | function getDarkMode(): DarkMode; | Added| 158| ohos.uiAppearance | uiAppearance | function setDarkMode(mode: DarkMode, callback: AsyncCallback\<void>): void;<br>function setDarkMode(mode: DarkMode): Promise\<void>; | Added| 159| ohos.uiAppearance | DarkMode | ALWAYS_LIGHT = 1 | Added| 160| ohos.uiAppearance | DarkMode | ALWAYS_DARK = 0 | Added| 161| viewmodel | CanvasRenderingContext2D | getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap | Added| 162| viewmodel | OffscreenCanvasRenderingContext2D | getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap | Added| 163| ohos.curves | curves | function spring(velocity: number, mass: number, stiffness: number, damping: number): string; | Deprecated| 164| ohos.curves | curves | function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; | Deprecated| 165| ohos.curves | curves | function steps(count: number, end: boolean): string; | Deprecated| 166| ohos.curves | curves | function init(curve?: Curve): string; | Deprecated| 167| system.router | Router | static disableAlertBeforeBackPage(options?: DisableAlertBeforeBackPageOptions): void; | Deprecated| 168| system.router | Router | static enableAlertBeforeBackPage(options: EnableAlertBeforeBackPageOptions): void; | Deprecated| 169| system.router | Router | static getState(): RouterState; | Deprecated| 170| system.router | Router | static getLength(): string; | Deprecated| 171| system.router | Router | static clear(): void; | Deprecated| 172| system.router | Router | static getParams(): ParamsInterface; | Deprecated| 173| system.router | Router | static back(options?: BackRouterOptions): void; | Deprecated| 174| system.router | Router | static replace(options: RouterOptions): void; | Deprecated| 175| system.router | Router | static push(options: RouterOptions): void; | Deprecated| 176| system.router | DisableAlertBeforeBackPageOptions | complete?: () => void; | Deprecated| 177| system.router | DisableAlertBeforeBackPageOptions | cancel?: (errMsg: string) => void; | Deprecated| 178| system.router | DisableAlertBeforeBackPageOptions | success?: (errMsg: string) => void; | Deprecated| 179| system.router | EnableAlertBeforeBackPageOptions | complete?: () => void; | Deprecated| 180| system.router | EnableAlertBeforeBackPageOptions | cancel?: (errMsg: string) => void; | Deprecated| 181| system.router | EnableAlertBeforeBackPageOptions | success?: (errMsg: string) => void; | Deprecated| 182| system.router | EnableAlertBeforeBackPageOptions | message: string; | Deprecated| 183| system.router | RouterState | path: string; | Deprecated| 184| system.router | RouterState | name: string; | Deprecated| 185| system.router | RouterState | index: number; | Deprecated| 186| system.router | BackRouterOptions | params?: Object; | Deprecated| 187| system.router | BackRouterOptions | uri?: string; | Deprecated| 188| system.router | RouterOptions | params?: Object; | Deprecated| 189| system.router | RouterOptions | uri: string; | Deprecated| 190| ohos.prompt | ActionMenuOptions |old : title?: string;<br>new : title?: string \| Resource; | Updated| 191| ohos.prompt | ShowDialogOptions |old : message?: string;<br>new : message?: string \| Resource; | Updated| 192| ohos.prompt | ShowDialogOptions |old : title?: string;<br>new : title?: string \| Resource; | Updated| 193| ohos.prompt | Button |old : color: string;<br>new : color: string \| Resource; | Updated| 194| ohos.prompt | Button |old : text: string;<br>new : text: string \| Resource; | Updated| 195| ohos.prompt | ShowToastOptions |old : message: string;<br>new : message: string \| Resource; | Updated| 196| ArkUI | BorderOptions |old : style?: BorderStyle;<br>new : style?: EdgeStyles \| BorderStyle; | Updated| 197| ArkUI | BorderOptions |old : radius?: Length;<br>new : radius?: BorderRadiuses \| Length; | Updated| 198| ArkUI | BorderOptions |old : color?: ResourceColor;<br>new : color?: EdgeColors \| ResourceColor; | Updated| 199| ArkUI | BorderOptions |old : width?: Length;<br>new : width?: EdgeWidths \| Length; | Updated| 200| ArkUI | AnimateParam |old : curve?: Curve \| string;<br>new : curve?: Curve \| string \| ICurve; | Updated| 201