From 07532c771e9272e2f53d7411db30ce2f075f89a3 Mon Sep 17 00:00:00 2001 From: Randolf Jung Date: Fri, 28 Jul 2023 12:06:30 +0200 Subject: [PATCH] Add `enableDragAndDrop` capability --- index.bs | 94 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 27 deletions(-) diff --git a/index.bs b/index.bs index 704dfd983..197d8e0ae 100644 --- a/index.bs +++ b/index.bs @@ -168,6 +168,7 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ text: confirm; url: timers-and-user-prompts.html#dom-confirm text: context mode; url: /canvas.html#offscreencanvas-context-mode text: default classic script fetch options; url: webappapis.html#default-classic-script-fetch-options + text: drag and drop operations; url: dnd.html#dnd text: environment settings object's Realm; url: webappapis.html#environment-settings-object's-realm text: handled; url: webappapis.html#concept-error-handled text: history handling behavior; url: browsing-the-web.html#history-handling-behavior @@ -1036,33 +1037,8 @@ To close the WebSocket connections given |session|: ## Establishing a Connection ## {#establishing} -WebDriver clients opt in to a bidirectional connection by requesting a -capability with the name "webSocketUrl" and value -true. - -This specification defines an -[=additional webdriver capability=] with the [=capability name=] "webSocketUrl". - -
-The [=additional capability deserialization algorithm=] for the -"webSocketUrl" capability, with parameter |value| is: - -1. If |value| is not a boolean, return [=error=] with [=error code|code=] - [=invalid argument=]. - -1. Return [=success=] with data |value|. - -
- -
-The [=matched capability serialization algorithm=] for the "webSocketUrl" capability, -with parameter |value| is: - -1. If |value| is false, return [=success=] with data null. - -1. Return [=success=] with data true. - -
+WebDriver clients opt in to a bidirectional connection by requesting the +[=WebSocket URL=] capability with value true.
The [=WebDriver new session algorithm=] defined by this specification, @@ -1396,6 +1372,7 @@ session.CapabilityRequest = { ? acceptInsecureCerts: bool, ? browserName: text, ? browserVersion: text, + ? enableDragAndDrop: bool, ? platformName: text, ? proxy: { ? proxyType: "pac" / "direct" / "autodetect" / "system" / "manual", @@ -1407,6 +1384,7 @@ session.CapabilityRequest = { ? socksProxy: text, ? socksVersion: 0..255, }, + ? webSocketUrl: bool, Extensible }; @@ -1414,6 +1392,67 @@ session.CapabilityRequest = { The session.CapabilityRequest type represents a specific set of requested capabilities. +WebDriver BiDi defines [=additional WebDriver capability|additional WebDriver +capabilities=]. The following tables enumerates the capabilities each +implementation must support for WebDriver BiDi. + +
+Capability: WebSocket URL
+Key: "webSocketUrl"
+Value type: boolean
+Description: Defines the current session's support for bidirection connection.
+
+ +
+Capability: Drag and Drop Support
+Key: "enableDragAndDrop"
+Value type: boolean
+Description: Defines the current session's drag and drop support.
+
+ +
+The [=additional capability deserialization algorithm=] for the +"webSocketUrl" capability, with parameter |value| is: + +1. If |value| is not a boolean, return [=error=] with [=error code|code=] + [=invalid argument=]. + +1. Return [=success=] with data |value|. + +
+ +
+The [=matched capability serialization algorithm=] for the "webSocketUrl" capability, +with parameter |value| is: + +1. If |value| is false, return [=success=] with data null. + +1. Return [=success=] with data true. + +
+ +
+The [=additional capability deserialization algorithm=] for the +"enableDragAndDrop" capability, with parameter |value| is: + +1. If |value| is not a boolean, return [=error=] with [=error code|code=] + [=invalid argument=]. + +1. Return [=success=] with data |value|. + +
+ +
+The [=matched capability serialization algorithm=] for the "enableDragAndDrop" capability, +with parameter |value| is: + +1. If |value| is false, the [=endpoint node=] must disable [=drag + and drop operations=]. + +1. Return [=success=] with data |value|. + +
+ #### The session.SubscriptionRequest Type #### {#type-session-SubscriptionRequest}
@@ -1508,6 +1547,7 @@ This is a [=static command=].
         sessionId: text,
         capabilities: {
           acceptInsecureCerts: bool,
+          enableDragAndDrop: bool,
           browserName: text,
           browserVersion: text,
           platformName: text,