fix(interaction): verify focus changes and honor cancellation

This commit is contained in:
drakezhang
2026-09-09 22:47:42 +08:00
parent aadc1376ff
commit ac9e7948bf
7 changed files with 708 additions and 130 deletions
@@ -14,7 +14,7 @@
}
},
"focused": {
"description": "Whether the target is the document's deep active element after the call.",
"description": "Whether the target holds DOM focus in its document or shadow root after the call.",
"type": "boolean"
},
"tab_id": {
+1 -1
View File
@@ -164,7 +164,7 @@ pub struct FocusResult {
pub used_ref: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub used_selector: Option<String>,
/// Whether the target is the document's deep active element after the call.
/// Whether the target holds DOM focus in its document or shadow root after the call.
pub focused: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub dialogs: Vec<JavaScriptDialogInfo>,