createDOMMouseEvent method

  1. @override
DOMMouseEvent? createDOMMouseEvent(
  1. DOMTreeMap<Node> treeMap,
  2. Object? event
)
override

Implementation

@override
DOMMouseEvent? createDOMMouseEvent(DOMTreeMap<Node> treeMap, event) {
  if (event is MouseEvent) {
    var eventTarget = event.target as Node?;
    var domTarget = treeMap.getMappedDOMNode(eventTarget);

    return DOMMouseEvent(
        treeMap,
        event,
        eventTarget,
        domTarget,
        event.client,
        event.offset,
        event.page,
        event.screen,
        event.button,
        event.buttons,
        event.altKey,
        event.ctrlKey,
        event.shiftKey,
        event.metaKey);
  }

  return null;
}