---
title: "webView(_:mouseDidMoveOverElement:modifierFlags:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webuidelegate/webview(_:mousedidmoveoverelement:modifierflags:)"
---

# webView(_:mouseDidMoveOverElement:modifierFlags:)

Updates information about the element the user is mousing over.

## Declaration

```swift
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 doc://com.apple.webkit/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.

## See Also

### Handling Mouse Events

- [webView(_:contextMenuItemsForElement:defaultMenuItems:)](webkit/webuidelegate/webview(_:contextmenuitemsforelement:defaultmenuitems:).md)
