---
title: "hasAttribute(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/domelement/hasattribute(_:)"
---

# hasAttribute(_:)

## Declaration

```swift
func hasAttribute(_ name: String!) -> Bool
```
