---
title: isForMainFrameOnly
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wkuserscript/isformainframeonly
---

# isForMainFrameOnly

A Boolean value that indicates whether to inject the script into the main frame or all frames.

## Declaration

```swift
var isForMainFrameOnly: Bool { get }
```

## Discussion

Discussion When the value of this property is true, the web view injects the script only into the main frame. When the value is false, the web view injects the script into all frames.

## See Also

### Inspecting Script Information

- [source](webkit/wkuserscript/source.md)
- [injectionTime](webkit/wkuserscript/injectiontime.md)
- [WKUserScriptInjectionTime](webkit/wkuserscriptinjectiontime.md)
