[android-components](../../index.md) / [mozilla.components.feature.contextmenu](../index.md) / [DefaultSelectionActionDelegate](index.md) / [performAction](./perform-action.md)

# performAction

`fun performAction(id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, selectedText: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/DefaultSelectionActionDelegate.kt#L53)

Overrides [SelectionActionDelegate.performAction](../../mozilla.components.concept.engine.selection/-selection-action-delegate/perform-action.md)

Should perform the action with the id of [id](../../mozilla.components.concept.engine.selection/-selection-action-delegate/perform-action.md#mozilla.components.concept.engine.selection.SelectionActionDelegate$performAction(kotlin.String, kotlin.String)/id).

**Returns**
[true](#) if the action was consumed.

