<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKUserScriptInjectionTime",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:@E@WKUserScriptInjectionTime"
  },
  "title" : "WKUserScriptInjectionTime"
}
-->

# WKUserScriptInjectionTime

Constants for the times at which to inject script content into a webpage.

```
enum WKUserScriptInjectionTime
```

## Topics

### Script-Injection Times

[`WKUserScriptInjectionTime.atDocumentStart`](/documentation/WebKit/WKUserScriptInjectionTime/atDocumentStart)

A constant to inject the script after the creation of the webpage’s document element, but before loading any other content.

[`WKUserScriptInjectionTime.atDocumentEnd`](/documentation/WebKit/WKUserScriptInjectionTime/atDocumentEnd)

A constant to inject the script after the document finishes loading, but before loading any other subresources.



---

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)
