mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
refactor(all): make all method return a promise
This commit is contained in:
@ -157,8 +157,8 @@ export class Content {
|
||||
}
|
||||
|
||||
@Method()
|
||||
getScrollElement(): HTMLElement {
|
||||
return this.scrollEl;
|
||||
getScrollElement(): Promise<HTMLElement> {
|
||||
return Promise.resolve(this.scrollEl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -182,7 +182,7 @@ export class Content {
|
||||
* Scroll by a specified X/Y distance in the component
|
||||
*/
|
||||
@Method()
|
||||
scrollByPoint(x: number, y: number, duration: number): Promise<any> {
|
||||
scrollByPoint(x: number, y: number, duration: number): Promise<void> {
|
||||
return this.scrollToPoint(x + this.scrollEl.scrollLeft, y + this.scrollEl.scrollTop, duration);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user