<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebUIDelegate/webView(_:mouseDidMoveOverElement:modifierFlags:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebUIDelegate(im)webView:mouseDidMoveOverElement:modifierFlags:"
  },
  "title" : "webView(_:mouseDidMoveOverElement:modifierFlags:)"
}
-->

# webView(_:mouseDidMoveOverElement:modifierFlags:)

Updates information about the element the user is mousing over.

```
optional func webView(_ sender: WebView!, mouseDidMoveOverElement elementInformation: [AnyHashable : Any]!, modifierFlags: Int)
```

## Parameters

`sender`

The web view that sent the message.

`elementInformation`

A dictionary that describes the element under the mouse, or `nil`. See “Constants” in [`WebView`](/documentation/WebKit/WebView-swift.class) for information about the key-value pairs in this dictionary.

`modifierFlags`

An integer bit field that indicates the modifier keys in effect during the event. See “Modifier Flags” in <doc://com.apple.documentation/documentation/AppKit/NSEvent> for information about possible modifiers. Note that this parameter was changed from an `unsigned int` to an `NSUInteger` in OS X v10.5.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)