---
title: "invokeUndefinedMethod(fromWebScript:withArguments:)"
framework: objectivec
role: symbol
role_heading: Instance Method
path: "objectivec/nsobject-swift.class/invokeundefinedmethod(fromwebscript:witharguments:)"
---

# invokeUndefinedMethod(fromWebScript:withArguments:)

Handles undefined method invocation from the scripting environment.

## Declaration

```swift
func invokeUndefinedMethod(fromWebScript name: String!, withArguments arguments: [Any]!) -> Any!
```

## Parameters

- `name`: The name of the undefined method.
- `arguments`: The arguments passed to the undefined method.

## Return Value

Return Value The result of invoking the undefined method.

## Discussion

Discussion This method is invoked when a script attempts to invoke a method not directly exported to the scripting environment. You should return the result of the invocation, converted appropriately for the scripting environment.

## See Also

### Invoking methods

- [invokeDefaultMethod(withArguments:)](objectivec/nsobject-swift.class/invokedefaultmethod(witharguments:).md)
