<!--
{
  "documentType" : "article",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/incorporating-scripts-legacy",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Incorporating Scripts (Legacy)"
}
-->

# Incorporating Scripts (Legacy)

## Topics

### Incorporating Scripts (Legacy)

[`WebScriptObject`](/documentation/WebKit/WebScriptObject)

A `WebScriptObject` object is an Objective-C wrapper for a scripting object passed to your application from the scripting environment.

  <doc://com.apple.documentation/documentation/ObjectiveC/webscripting>

[`WebUndefined`](/documentation/WebKit/WebUndefined)

`WebUndefined` objects are simply used to represent the JavaScript “undefined” value in methods when bridging between JavaScript and Objective-C. For example, if you invoke a JavaScript function that returns the JavaScript “undefined” value, then a `WebUndefined` object is returned to the Objective-C calling context.



---

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)