up method

  1. @override
Future up(
  1. MouseButton button, {
  2. PageLoaderElement? eventTarget,
})
override

Release at current location. If eventTarget is specified, PageLoader will attempt to fire the corresponding pointer events on that target, otherwise it will fire the events on the target that is under the current location.

Implementation

@override
Future up(MouseButton button, {PageLoaderElement? eventTarget}) =>
    syncFn(() async {
      if (eventTarget != null) {
        await moveTo(eventTarget as HtmlPageLoaderElement, null, null);
      }
      return _dispatchEvent(
          'pointerup', eventTarget as HtmlPageLoaderElement?, button);
    });