大网数据广告活动
Web 标准与前端开发

`input.releaseActions` command

· 52CE 我爱测

The `input.releaseActions` command of the `input` module releases any held keys or pressed pointer buttons for a given context and resets the input state for that context. Call it after `input.performActions` to clean up any inputs left in an intermediate state.

The input.releaseActions command of the input module releases any held keys or pressed pointer buttons for a given context and resets the input state for that context. Call it after input.performActions to clean up any inputs left in an intermediate state.

Syntax

{
  "method": "input.releaseActions",
  "params": {
    "context": "5f07e3ca-ecac-465e-b9ef-49000c196ecf"
  }
}

Parameters

The params field contains:

  • context
    • : A string that contains the ID of the context for which to release inputs. Context IDs are returned by commands such as browsingContext.getTree.

Return value

The result field in the response is an empty object ({}).

Errors

  • invalid argument
    • : A required parameter is missing or has an invalid type.
  • no such frame
    • : No context with the given context ID is found.

Examples

Releasing all active inputs

With a WebDriver BiDi connection and an active session, send the following message after input.performActions to release all held keys and pointer buttons and reset the input state:

{
  "id": 1,
  "method": "input.releaseActions",
  "params": {
    "context": "6B3D5B3A-6571-432B-8E96-E53B5C2ECBB5"
  }
}

The browser responds as follows:

{
  "id": 1,
  "type": "success",
  "result": {}
}

Specifications

Browser compatibility

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。