{
  "doc": {
    "id": "api/commands/invoke",
    "title": "cy.invoke()",
    "description": "Invoke a function on the previously yielded subject in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/invoke.md",
    "version": "29f95bf8bb06f320986f3749f5bf09a35a409eab",
    "updated_at": "2026-09-04T10:49:54.630Z",
    "headings": [
      {
        "id": "api/commands/invoke#invoke",
        "text": "invoke",
        "level": 1
      },
      {
        "id": "api/commands/invoke#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/invoke#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/invoke#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/invoke#yields",
        "text": "Yields",
        "level": 3
      },
      {
        "id": "api/commands/invoke#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/invoke#function",
        "text": "Function",
        "level": 3
      },
      {
        "id": "api/commands/invoke#assert-on-a-functions-return-value",
        "text": "Assert on a function's return value",
        "level": 4
      },
      {
        "id": "api/commands/invoke#use-invoke-to-test-html-content",
        "text": "Use .invoke() to test HTML content",
        "level": 4
      },
      {
        "id": "api/commands/invoke#properties-that-are-functions-are-invoked",
        "text": "Properties that are functions are invoked",
        "level": 4
      },
      {
        "id": "api/commands/invoke#use-invoke-show-and-invoke-trigger",
        "text": "Use .invoke('show') and .invoke('trigger')",
        "level": 4
      },
      {
        "id": "api/commands/invoke#function-with-arguments",
        "text": "Function with Arguments",
        "level": 3
      },
      {
        "id": "api/commands/invoke#send-specific-arguments-to-the-function",
        "text": "Send specific arguments to the function",
        "level": 4
      },
      {
        "id": "api/commands/invoke#use-cy-invoke-removeattr-target-to-get-around-new-tab",
        "text": "Use cy.invoke('removeAttr', 'target') to get around new tab",
        "level": 4
      },
      {
        "id": "api/commands/invoke#arguments-are-automatically-forwarded-to-the-function",
        "text": "Arguments are automatically forwarded to the function",
        "level": 4
      },
      {
        "id": "api/commands/invoke#arrays",
        "text": "Arrays",
        "level": 3
      },
      {
        "id": "api/commands/invoke#jquery-method",
        "text": "jQuery method",
        "level": 3
      },
      {
        "id": "api/commands/invoke#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/invoke#third-party-plugins",
        "text": "Third Party Plugins",
        "level": 3
      },
      {
        "id": "api/commands/invoke#using-a-kendo-dropdown",
        "text": "Using a Kendo DropDown",
        "level": 4
      },
      {
        "id": "api/commands/invoke#retries",
        "text": "Retries",
        "level": 3
      },
      {
        "id": "api/commands/invoke#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/invoke#requirements",
        "text": "Requirements",
        "level": 3
      },
      {
        "id": "api/commands/invoke#assertions",
        "text": "Assertions",
        "level": 3
      },
      {
        "id": "api/commands/invoke#timeouts",
        "text": "Timeouts",
        "level": 3
      },
      {
        "id": "api/commands/invoke#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/invoke#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/invoke#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/invoke#syntax",
      "doc_id": "api/commands/invoke",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.invoke(functionName)\n.invoke(options, functionName)\n.invoke(functionName, args...)\n.invoke(options, functionName, args...)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('.input').invoke('val').should('eq', 'foo') // Invoke the 'val' function\ncy.get('.modal').invoke('show') // Invoke the jQuery 'show' function\ncy.wrap({ animate: fn }).invoke('animate') // Invoke the 'animate' function\n```\n\n**Incorrect Usage**\n\n```\ncy.invoke('convert') // Errors, cannot be chained off 'cy'\ncy.wrap({ name: 'Jane' }).invoke('name') // Errors, 'name' is not a function\ncy.wrap({ animate: fn })\n  .invoke('animate')\n  .then(() => {}) // 'animate' will be called multiple times\n```\n\n### Arguments\n\n**functionName _(String, Number)_**\n\nName of function to be invoked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.invoke()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.invoke()` to resolve before [timing out](#Timeouts) |\n\nargs...\\*\\*\n\nAdditional arguments to be given to the function call. There is no limit to the number of arguments.\n\n### Yields\n\n*   `.invoke()` yields the return value of the method.\n*   `.invoke()` is a query, and it is _safe_ to chain further commands.\n*   If you chain additional commands off of `.invoke()`, the function will be called multiple times!\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 275
    },
    {
      "id": "api/commands/invoke#usage",
      "doc_id": "api/commands/invoke",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('.input').invoke('val').should('eq', 'foo') // Invoke the 'val' function\ncy.get('.modal').invoke('show') // Invoke the jQuery 'show' function\ncy.wrap({ animate: fn }).invoke('animate') // Invoke the 'animate' function\n```\n\n**Incorrect Usage**\n\n```\ncy.invoke('convert') // Errors, cannot be chained off 'cy'\ncy.wrap({ name: 'Jane' }).invoke('name') // Errors, 'name' is not a function\ncy.wrap({ animate: fn })\n  .invoke('animate')\n  .then(() => {}) // 'animate' will be called multiple times\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 89
    },
    {
      "id": "api/commands/invoke#arguments",
      "doc_id": "api/commands/invoke",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**functionName _(String, Number)_**\n\nName of function to be invoked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.invoke()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.invoke()` to resolve before [timing out](#Timeouts) |\n\nargs...\\*\\*\n\nAdditional arguments to be given to the function call. There is no limit to the number of arguments.\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 116
    },
    {
      "id": "api/commands/invoke#yields",
      "doc_id": "api/commands/invoke",
      "heading": "Yields",
      "heading_level": 3,
      "content_markdown": "### Yields\n\n*   `.invoke()` yields the return value of the method.\n*   `.invoke()` is a query, and it is _safe_ to chain further commands.\n*   If you chain additional commands off of `.invoke()`, the function will be called multiple times!\n",
      "section": "api",
      "anchors": [
        "yields"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 53
    },
    {
      "id": "api/commands/invoke#examples",
      "doc_id": "api/commands/invoke",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Function\n\n#### Assert on a function's return value\n\n```\nconst fn = () => {\n  return 'bar'\n}\n\ncy.wrap({ foo: fn }).invoke('foo').should('eq', 'bar') // true\n```\n\n#### Use `.invoke()` to test HTML content\n\n[Check out our example recipe where we use `cy.invoke('text')` to test against HTML content in 'Bootstrapping your App'](/llm/markdown/app/references/recipes.md#Server-Communication)\n\n#### Properties that are functions are invoked\n\nIn the example below, we use `.invoke()` to force a hidden div to be `'display: block'` so we can interact with its children elements.\n\n```\ncy.get('div.container')\n  .should('be.hidden') // element is hidden\n  .invoke('show') // call jquery method 'show' on the '.container'\n  .should('be.visible') // element is visible now\n  .find('input') // drill down into a child \"input\" element\n  .type('Cypress is great') // and type text\n```\n\n#### Use `.invoke('show')` and `.invoke('trigger')`\n\n[Check out our example recipe where we use `cy.invoke('show')` and `cy.invoke('trigger')` to click an element that is only visible on hover](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n\n### Function with Arguments\n\n#### Send specific arguments to the function\n\n```\nconst fn = (a, b, c) => {\n  return a + b + c\n}\n\ncy.wrap({ sum: fn })\n  .invoke('sum', 2, 4, 6)\n  .should('be.gt', 10) // true\n  .and('be.lt', 20) // true\n```\n\n#### Use `cy.invoke('removeAttr', 'target')` to get around new tab\n\n[Check out our example recipe where we use `cy.invoke('removeAttr', 'target')` to test clicking on a link without opening in a new tab](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n\n#### Arguments are automatically forwarded to the function\n\n```\ncy.get('img').invoke('attr', 'src').should('include', 'myLogo')\n```\n\n### Arrays\n\nIn the above examples, the subject was an object, but `cy.invoke` also works on arrays and allows using numerical index to pick a function to run.\n\n```\nconst reverse = (s) => Cypress._.reverse(s)\nconst double = (n) => n * n\n\n// picks function with index 1 and calls it with argument 4\ncy.wrap([reverse, double]).invoke(1, 4).should('eq', 16)\n```\n\n### jQuery method\n\nIf the parent command yields a jQuery element, we can invoke a jQuery method, like `attr`, `text`, or `val`. To confirm the element's `id` attribute for example:\n\n```\n<div id=\"code-snippet\">The code example</div>\n```\n\n```\ncy.contains('The code example')\n  .invoke('attr', 'id')\n  .should('equal', 'code-snippet')\n```\n\n**Tip:** Cypress has a built-in Chai-jQuery assertion to confirm the attribute. The above example can be written simply as:\n\n```\ncy.contains('The code example').should('have.attr', 'id', 'code-snippet')\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 492
    },
    {
      "id": "api/commands/invoke#function",
      "doc_id": "api/commands/invoke",
      "heading": "Function",
      "heading_level": 3,
      "content_markdown": "### Function\n\n#### Assert on a function's return value\n\n```\nconst fn = () => {\n  return 'bar'\n}\n\ncy.wrap({ foo: fn }).invoke('foo').should('eq', 'bar') // true\n```\n\n#### Use `.invoke()` to test HTML content\n\n[Check out our example recipe where we use `cy.invoke('text')` to test against HTML content in 'Bootstrapping your App'](/llm/markdown/app/references/recipes.md#Server-Communication)\n\n#### Properties that are functions are invoked\n\nIn the example below, we use `.invoke()` to force a hidden div to be `'display: block'` so we can interact with its children elements.\n\n```\ncy.get('div.container')\n  .should('be.hidden') // element is hidden\n  .invoke('show') // call jquery method 'show' on the '.container'\n  .should('be.visible') // element is visible now\n  .find('input') // drill down into a child \"input\" element\n  .type('Cypress is great') // and type text\n```\n\n#### Use `.invoke('show')` and `.invoke('trigger')`\n\n[Check out our example recipe where we use `cy.invoke('show')` and `cy.invoke('trigger')` to click an element that is only visible on hover](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n",
      "section": "api",
      "anchors": [
        "function"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 197
    },
    {
      "id": "api/commands/invoke#properties-that-are-functions-are-invoked",
      "doc_id": "api/commands/invoke",
      "heading": "Properties that are functions are invoked",
      "heading_level": 4,
      "content_markdown": "#### Properties that are functions are invoked\n\nIn the example below, we use `.invoke()` to force a hidden div to be `'display: block'` so we can interact with its children elements.\n\n```\ncy.get('div.container')\n  .should('be.hidden') // element is hidden\n  .invoke('show') // call jquery method 'show' on the '.container'\n  .should('be.visible') // element is visible now\n  .find('input') // drill down into a child \"input\" element\n  .type('Cypress is great') // and type text\n```\n",
      "section": "api",
      "anchors": [
        "properties-that-are-functions-are-invoked"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 93
    },
    {
      "id": "api/commands/invoke#function-with-arguments",
      "doc_id": "api/commands/invoke",
      "heading": "Function with Arguments",
      "heading_level": 3,
      "content_markdown": "### Function with Arguments\n\n#### Send specific arguments to the function\n\n```\nconst fn = (a, b, c) => {\n  return a + b + c\n}\n\ncy.wrap({ sum: fn })\n  .invoke('sum', 2, 4, 6)\n  .should('be.gt', 10) // true\n  .and('be.lt', 20) // true\n```\n\n#### Use `cy.invoke('removeAttr', 'target')` to get around new tab\n\n[Check out our example recipe where we use `cy.invoke('removeAttr', 'target')` to test clicking on a link without opening in a new tab](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n\n#### Arguments are automatically forwarded to the function\n\n```\ncy.get('img').invoke('attr', 'src').should('include', 'myLogo')\n```\n",
      "section": "api",
      "anchors": [
        "function-with-arguments"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 117
    },
    {
      "id": "api/commands/invoke#send-specific-arguments-to-the-function",
      "doc_id": "api/commands/invoke",
      "heading": "Send specific arguments to the function",
      "heading_level": 4,
      "content_markdown": "#### Send specific arguments to the function\n\n```\nconst fn = (a, b, c) => {\n  return a + b + c\n}\n\ncy.wrap({ sum: fn })\n  .invoke('sum', 2, 4, 6)\n  .should('be.gt', 10) // true\n  .and('be.lt', 20) // true\n```\n",
      "section": "api",
      "anchors": [
        "send-specific-arguments-to-the-function"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 53
    },
    {
      "id": "api/commands/invoke#use-cy-invoke-removeattr-target-to-get-around-new-tab",
      "doc_id": "api/commands/invoke",
      "heading": "Use cy.invoke('removeAttr', 'target') to get around new tab",
      "heading_level": 4,
      "content_markdown": "#### Use `cy.invoke('removeAttr', 'target')` to get around new tab\n\n[Check out our example recipe where we use `cy.invoke('removeAttr', 'target')` to test clicking on a link without opening in a new tab](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n",
      "section": "api",
      "anchors": [
        "use-cy-invoke-removeattr-target-to-get-around-new-tab"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 41
    },
    {
      "id": "api/commands/invoke#arrays",
      "doc_id": "api/commands/invoke",
      "heading": "Arrays",
      "heading_level": 3,
      "content_markdown": "### Arrays\n\nIn the above examples, the subject was an object, but `cy.invoke` also works on arrays and allows using numerical index to pick a function to run.\n\n```\nconst reverse = (s) => Cypress._.reverse(s)\nconst double = (n) => n * n\n\n// picks function with index 1 and calls it with argument 4\ncy.wrap([reverse, double]).invoke(1, 4).should('eq', 16)\n```\n",
      "section": "api",
      "anchors": [
        "arrays"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 80
    },
    {
      "id": "api/commands/invoke#jquery-method",
      "doc_id": "api/commands/invoke",
      "heading": "jQuery method",
      "heading_level": 3,
      "content_markdown": "### jQuery method\n\nIf the parent command yields a jQuery element, we can invoke a jQuery method, like `attr`, `text`, or `val`. To confirm the element's `id` attribute for example:\n\n```\n<div id=\"code-snippet\">The code example</div>\n```\n\n```\ncy.contains('The code example')\n  .invoke('attr', 'id')\n  .should('equal', 'code-snippet')\n```\n\n**Tip:** Cypress has a built-in Chai-jQuery assertion to confirm the attribute. The above example can be written simply as:\n\n```\ncy.contains('The code example').should('have.attr', 'id', 'code-snippet')\n```\n",
      "section": "api",
      "anchors": [
        "jquery-method"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 95
    },
    {
      "id": "api/commands/invoke#notes",
      "doc_id": "api/commands/invoke",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Third Party Plugins\n\n#### Using a Kendo DropDown\n\nIf you are using `jQuery` then the `jQuery` wrapped elements will automatically have your 3rd party plugins available to be called.\n\n```\ncy.get('input')\n  .invoke('getKendoDropDownList')\n  .then((dropDownList) => {\n    // yields the return of $input.getKendoDropDownList()\n    return dropDownList.select('apples')\n  })\n```\n\nWe can rewrite the previous example in a more terse way and add an assertion.\n\n```\ncy.get('input')\n  .invoke('getKendoDropDownList')\n  .invoke('select', 'apples')\n  .invoke('val')\n  .should('match', /apples/)\n```\n\n### Retries\n\n`.invoke()` automatically retries invoking the specified method until the returned value satisfies the attached assertions. The example below passes after 1 second.\n\n```\nlet message = 'hello'\nconst english = {\n  greeting() {\n    return message\n  },\n}\n\nsetTimeout(() => {\n  message = 'bye'\n}, 1000)\n\n// initially the english.greeting() returns \"hello\" failing the assertion.\n// .invoke('greeting') tries again and again until after 1 second\n// the returned message becomes \"bye\" and the assertion passes\ncy.wrap(english).invoke('greeting').should('equal', 'bye')\n```\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 201
    },
    {
      "id": "api/commands/invoke#third-party-plugins",
      "doc_id": "api/commands/invoke",
      "heading": "Third Party Plugins",
      "heading_level": 3,
      "content_markdown": "### Third Party Plugins\n\n#### Using a Kendo DropDown\n\nIf you are using `jQuery` then the `jQuery` wrapped elements will automatically have your 3rd party plugins available to be called.\n\n```\ncy.get('input')\n  .invoke('getKendoDropDownList')\n  .then((dropDownList) => {\n    // yields the return of $input.getKendoDropDownList()\n    return dropDownList.select('apples')\n  })\n```\n\nWe can rewrite the previous example in a more terse way and add an assertion.\n\n```\ncy.get('input')\n  .invoke('getKendoDropDownList')\n  .invoke('select', 'apples')\n  .invoke('val')\n  .should('match', /apples/)\n```\n",
      "section": "api",
      "anchors": [
        "third-party-plugins"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 93
    },
    {
      "id": "api/commands/invoke#using-a-kendo-dropdown",
      "doc_id": "api/commands/invoke",
      "heading": "Using a Kendo DropDown",
      "heading_level": 4,
      "content_markdown": "#### Using a Kendo DropDown\n\nIf you are using `jQuery` then the `jQuery` wrapped elements will automatically have your 3rd party plugins available to be called.\n\n```\ncy.get('input')\n  .invoke('getKendoDropDownList')\n  .then((dropDownList) => {\n    // yields the return of $input.getKendoDropDownList()\n    return dropDownList.select('apples')\n  })\n```\n\nWe can rewrite the previous example in a more terse way and add an assertion.\n\n```\ncy.get('input')\n  .invoke('getKendoDropDownList')\n  .invoke('select', 'apples')\n  .invoke('val')\n  .should('match', /apples/)\n```\n",
      "section": "api",
      "anchors": [
        "using-a-kendo-dropdown"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 88
    },
    {
      "id": "api/commands/invoke#retries",
      "doc_id": "api/commands/invoke",
      "heading": "Retries",
      "heading_level": 3,
      "content_markdown": "### Retries\n\n`.invoke()` automatically retries invoking the specified method until the returned value satisfies the attached assertions. The example below passes after 1 second.\n\n```\nlet message = 'hello'\nconst english = {\n  greeting() {\n    return message\n  },\n}\n\nsetTimeout(() => {\n  message = 'bye'\n}, 1000)\n\n// initially the english.greeting() returns \"hello\" failing the assertion.\n// .invoke('greeting') tries again and again until after 1 second\n// the returned message becomes \"bye\" and the assertion passes\ncy.wrap(english).invoke('greeting').should('equal', 'bye')\n```\n",
      "section": "api",
      "anchors": [
        "retries"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 105
    },
    {
      "id": "api/commands/invoke#rules",
      "doc_id": "api/commands/invoke",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements\n\n*   `.invoke()` requires being chained off a previous command.\n\n### Assertions\n\n*   `.invoke()` will wait for the `function` to exist on the subject before running.\n*   `.invoke()` will throw an error if the invoked `function` returns a promise. If you want to invoke a function that returns a promise, use [`.then()`](/llm/markdown/api/commands/then.md) instead.\n*   `.invoke()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until all chained assertions have passed.\n\n### Timeouts\n\n*   `.invoke()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 108
    },
    {
      "id": "api/commands/invoke#assertions",
      "doc_id": "api/commands/invoke",
      "heading": "Assertions",
      "heading_level": 3,
      "content_markdown": "### Assertions\n\n*   `.invoke()` will wait for the `function` to exist on the subject before running.\n*   `.invoke()` will throw an error if the invoked `function` returns a promise. If you want to invoke a function that returns a promise, use [`.then()`](/llm/markdown/api/commands/then.md) instead.\n*   `.invoke()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until all chained assertions have passed.\n",
      "section": "api",
      "anchors": [
        "assertions"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 72
    },
    {
      "id": "api/commands/invoke#command-log",
      "doc_id": "api/commands/invoke",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Invoke jQuery show method on element_**\n\n```\ncy.get('.connectors-div')\n  .should('be.hidden')\n  .invoke('show')\n  .should('be.visible')\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on `invoke` within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 51
    },
    {
      "id": "api/commands/invoke#history",
      "doc_id": "api/commands/invoke",
      "heading": "History",
      "heading_level": 2,
      "content_markdown": "## History\n\n| Version | Changes |\n| --- | --- |\n| [12.0.0](/llm/markdown/app/references/changelog.md#12-0-0) | `.invoke()` no longer supports promises or async functions |\n| [3.8.0](/llm/markdown/app/references/changelog.md#3-8-0) | Added support for `options` argument |\n| [3.7.0](/llm/markdown/app/references/changelog.md#3-7-0) | Added support for arguments of type Number for `functionName` |\n",
      "section": "api",
      "anchors": [
        "history"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 61
    }
  ]
}