W3cubDocs

/Dart 2

scroll method

void scroll ([dynamic options_OR_x, dynamic y, Map scrollOptions ])

Scrolls the page horizontally and vertically to a specific point.

This method is identical to scrollTo.

Other resources

Implementation

void scroll([options_OR_x, y, Map scrollOptions]) {
  if (options_OR_x == null && y == null && scrollOptions == null) {
    _scroll_1();
    return;
  }
  if ((options_OR_x is Map) && y == null && scrollOptions == null) {
    var options_1 = convertDartToNative_Dictionary(options_OR_x);
    _scroll_2(options_1);
    return;
  }
  if ((y is num) && (options_OR_x is num) && scrollOptions == null) {
    _scroll_3(options_OR_x, y);
    return;
  }
  if ((y is int) && (options_OR_x is int) && scrollOptions == null) {
    _scroll_4(options_OR_x, y);
    return;
  }
  if (scrollOptions != null && (y is int) && (options_OR_x is int)) {
    var scrollOptions_1 = convertDartToNative_Dictionary(scrollOptions);
    _scroll_5(options_OR_x, y, scrollOptions_1);
    return;
  }
  throw new ArgumentError("Incorrect number or type of arguments");
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-html/Window/scroll.html