0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ion-contentをスクロール後に次の処理を実行したい場合

Last updated at Posted at 2020-05-12

scrollToPointなどでスクロール後に次の処理を実行したい場合のJavaScriptの書き方について、
ソースコード例も見当たらないので、こちらに残しておきます。

###Promisメソッドを利用する

以下のソースコード例は、ion-contentを500ミリ秒で縦に100px移動した後にfunc()が実行される例:

document.querySelector('ion-content').scrollToPoint(0,100,500).then(func);

function func() {
// ここにスクロール後に実行したい処理
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?