@@ -1867,12 +1867,9 @@ remove event subscriptions identified by subscription IDs.
1867
1867
1868
1868
#### The session.UnsubscribeByAttributesRequest Type #### {#type-session-UnsubscribeByAttributesRequest}
1869
1869
1870
- Note: contexts param is deprecated and will be removed in the future versions.
1871
-
1872
1870
<pre class="cddl" data-cddl-module="remote-cddl">
1873
1871
session.UnsubscribeByAttributesRequest = {
1874
1872
events: [+text] ,
1875
- ? contexts: [+browsingContext.BrowsingContext] ,
1876
1873
}
1877
1874
</pre>
1878
1875
@@ -2180,9 +2177,6 @@ either globally or for a set of navigables.
2180
2177
2181
2178
Issue: This needs to be generalised to work with realms too.
2182
2179
2183
- Note: contexts parameter in UnsubscribeByAttributesRequest is deprecated
2184
- and will be removed in the future versions.
2185
-
2186
2180
<dl>
2187
2181
<dt> Command Type</dt>
2188
2182
<dd>
@@ -2216,26 +2210,10 @@ The [=remote end steps=] with |session| and |command parameters| are:
2216
2210
let |event names| be the [=set/union=] of |event names| and the result of
2217
2211
[=trying=] to [=obtain a set of event names=] with |name|.
2218
2212
2219
- 1. Let |top-level traversable context ids| be a [=/set=] .
2220
-
2221
- 1. Let |input context ids| be [=set/create|create a set=] with |command parameters|[<code>contexts</code>] .
2222
-
2223
- 1. If |input context ids| is not empty:
2224
-
2225
- 1. Let |navigables| be the result of [=trying=] to [=get valid navigables by ids=] with |input context ids|.
2226
-
2227
- 1. Set |top-level traversables| be [=get top-level traversables=] with |navigables|.
2228
-
2229
- 1. For each |navigable| in |top-level traversables|:
2230
-
2231
- 1. [=set/Append=] |navigable|'s [=navigable id=] to |top-level traversable context ids|.
2232
-
2233
2213
1. Let |new subscriptions| to be a [=/list=] .
2234
2214
2235
2215
1. Let |matched events| to be a [=/set=] .
2236
2216
2237
- 1. Let |matched contexts| to be a [=/set=] .
2238
-
2239
2217
1. For each |subscription| of |session|'s [=subscriptions=] :
2240
2218
2241
2219
1. If [=set/intersection=] of |subscription|'s [=subscription/event names=] and |event names| is an empty [=/set=] :
@@ -2244,83 +2222,32 @@ The [=remote end steps=] with |session| and |command parameters| are:
2244
2222
2245
2223
1. [=Continue=] .
2246
2224
2247
- 1. If |top-level traversable context ids| is an empty [=/set=] :
2248
-
2249
- 1. If |subscription| is not [=subscription/global=] :
2250
-
2251
- 1. [=list/append=] |subscription| to |new subscriptions|.
2252
-
2253
- 1. [=Continue=] .
2254
-
2255
- 1. Let |subscription event names| be [=set/clone=] of |subscription|'s [=subscription/event names=] .
2256
-
2257
- 1. For each |event name| of |event names|:
2258
-
2259
- 1. If |subscription event names| [=set/contains=] |event name|:
2260
-
2261
- 1. [=list/Append=] |event name| to |matched events|.
2225
+ 1. If |subscription| is not [=subscription/global=] :
2262
2226
2263
- 1. [=list/Remove=] |event name| from |subscription event names|.
2264
-
2265
- 1. If |subscription event names| is not empty:
2266
-
2267
- 1. Let |cloned subscription| be a [=subscription=] with
2268
- [=subscription/subscription id=] set to |subscription|'s [=subscription/subscription id=] ,
2269
- [=subscription/event names=] set to a new [=/set=] containing |subscription event names|.
2270
-
2271
- 1. [=list/append=] |cloned subscription| to |new subscriptions|.
2272
-
2273
- 1. Otherwise:
2274
-
2275
- 1. If |subscription| is [=subscription/global=] :
2276
-
2277
- 1. [=list/append=] |subscription| to |new subscriptions|.
2278
-
2279
- 1. Otherwise, if |subscription|'s [=subscription/user context ids=] is not empty, [=continue=] .
2280
-
2281
- 1. Otherwise:
2282
-
2283
- Note: unsubscribe by contexts is deprecated and will be removed in the future versions.
2284
-
2285
- 1. Let |event map| be an empty [=/map=] .
2286
-
2287
- 1. For each |event name| in |subscription|'s [=subscription/event names=] :
2288
-
2289
- 1. Set |event map|[|event name|] to [=set/clone=] of |subscription|'s [=subscription/top-level traversable ids=] .
2290
-
2291
- 1. For each |event name| in |event names|:
2292
-
2293
- 1. If |event map|[|event name|] does not exist,
2294
- [=continue=] .
2295
-
2296
- 1. For each |top-level traversable id| of |top-level traversable context ids|:
2227
+ 1. [=list/append=] |subscription| to |new subscriptions|.
2297
2228
2298
- 1. If |event map| [|event name|] [=set/contains=] |top-level traversable id|:
2229
+ 1. [=Continue=] .
2299
2230
2300
- 1. [=list/Append =] |top-level traversable id| to |matched contexts| .
2231
+ 1. Let |subscription event names| be [=set/clone =] of |subscription|'s [=subscription/event names=] .
2301
2232
2302
- 1. [=list/Append=] |event name| to |matched events|.
2233
+ 1. For each |event name| of |event names|:
2303
2234
2304
- 1. [=list/Remove =] |top-level traversable id| from | event map| [|event name|] .
2235
+ 1. If |subscription event names| [=set/contains =] |event name|:
2305
2236
2306
- 1. If |event map| [|event name|] is an empty [=/set=] ,
2237
+ 1. [=list/Append=] |event name| to |matched events|.
2307
2238
2308
- 1. [=map /Remove=] |event map| [| event name|] .
2239
+ 1. [=list /Remove=] |event name| from |subscription event names| .
2309
2240
2310
- 1. For each | event name| → |remaining top-level traversable ids| in |event map| :
2241
+ 1. If |subscription event names| is not empty :
2311
2242
2312
- 1. Let |partial subscription| be a [=subscription=] with
2313
- [=subscription/subscription id=] set to |subscription|'s [=subscription/subscription id=] ,
2314
- [=subscription/event names=] set to a new [=/set=] containing |event name|,
2315
- [=subscription/top-level traversable ids=] set to |remaining top-level traversable ids|.
2243
+ 1. Let |cloned subscription| be a [=subscription=] with
2244
+ [=subscription/subscription id=] set to |subscription|'s [=subscription/subscription id=] ,
2245
+ [=subscription/event names=] set to a new [=/set=] containing |subscription event names|.
2316
2246
2317
- 1. [=list/append=] |partial subscription| to |new subscriptions|.
2247
+ 1. [=list/append=] |cloned subscription| to |new subscriptions|.
2318
2248
2319
2249
1. If |matched events| is not [=set/equal=] to |event names|, return [=error=] with [=error code=] [=invalid argument=] .
2320
2250
2321
- 1. If |top-level traversable context ids| is not empty and |matched contexts| is not [=set/equal=] to
2322
- |top-level traversable context ids|, return [=error=] with [=error code=] [=invalid argument=] .
2323
-
2324
2251
1. Set |session|'s [=subscriptions=] to |new subscriptions|.
2325
2252
2326
2253
1. Otherwise:
0 commit comments