---
title: "hasInjectedContent(for:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextensioncontext/hasinjectedcontent(for:)"
---

# hasInjectedContent(for:)

Checks if the extension has script or stylesheet content that can be injected into the specified URL.

## Declaration

```swift
func hasInjectedContent(for url: URL) -> Bool
```

## Parameters

- `url`: The webpage URL to check.

## Return Value

Return Value Returns YES if the extension has content that can be injected by matching the URL against the extension’s requested match patterns.

## Discussion

Discussion The extension context will still need to be loaded and have granted website permissions for its content to actually be injected.
