✅️️ Methods
🔨Storage.clearCookies
清除Cookie。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| browserContextId | | | Browser.BrowserContextID | 在浏览器端点上调用时使用的浏览器上下文。 | ENBrowser context to use when called on the browser endpoint. |
🔨Storage.clearDataForOrigin
清除源站存储。
EN
Clears storage for origin.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 安全来源。 | ENSecurity origin. |
| storageTypes | ✔️ | | string | 清除的存储类型列表,以逗号分隔。 | ENComma separated list of StorageType to clear. |
🔨Storage.clearDataForStorageKey
清除存储键的存储数据。
EN
Clears storage for storage key.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| storageKey | ✔️ | | string | 存储键。 | ENStorage key. |
| storageTypes | ✔️ | | string | 清除的存储类型列表,以逗号分隔。 | ENComma separated list of StorageType to clear. |
🔨Storage.getCookies
返回所有浏览器Cookie。
EN
Returns all browser cookies.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| browserContextId | | | Browser.BrowserContextID | 在浏览器端点调用时使用的浏览器上下文。 | ENBrowser context to use when called on the browser endpoint. |
| 返回对象 | 类型 | 描述 | 原文 |
|---|
| cookies | array[Network.Cookie] | Cookie 对象的数组。 | ENArray of cookie objects. |
🔨Storage.getUsageAndQuota
返回使用量和配额(以字节为单位)。
EN
Returns usage and quota in bytes.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 安全来源。 | ENSecurity origin. |
| 返回对象 | 类型 | 描述 | 原文 |
|---|
| usage | number | 存储使用量(字节)。 | ENStorage usage (bytes). |
| quota | number | 存储 配额(字节)。 | ENStorage quota (bytes). |
| overrideActive | boolean | 该源点是否具有活跃的存储配额覆盖 | ENWhether or not the origin has an active storage quota override |
| usageBreakdown | array[UsageForType] | 每种类型的存储使用量(字节)。 | ENStorage usage per type (bytes). |
🔨Storage.setCookies
设置给定的cookies。
EN
🔨Storage.setProtectedAudienceKAnonymity
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| owner | ✔️ | | string | | |
| name | ✔️ | | string | | |
| hashes | ✔️ | | array[string] | | |
🔨Storage.trackCacheStorageForOrigin
当缓存存储列表发生更新时,注册源以接收通知。
EN
Registers origin to be notified when an update occurs to its cache storage list.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 安全来源。 | ENSecurity origin. |
🔨Storage.trackCacheStorageForStorageKey
注册存储密钥,以便在其缓存存储列表发生更新时接收通知。
EN
Registers storage key to be notified when an update occurs to its cache storage list.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| storageKey | ✔️ | | string | 存储键。 | ENStorage key. |
🔨Storage.trackIndexedDBForOrigin
当''和``中的内容发生更新时,注册来源以接收其IndexedDB的通知。
EN
Registers origin to be notified when an update occurs to its IndexedDB.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 安全源。 | ENSecurity origin. |
🔨Storage.trackIndexedDBForStorageKey
当''和``中的内容发生更新时,注册存储密钥以接收其IndexedDB的通知。
EN
Registers storage key to be notified when an update occurs to its IndexedDB.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| storageKey | ✔️ | | string | 存储键。 | ENStorage key. |
🔨Storage.untrackCacheStorageForOrigin
取消注册源,使其不再接收缓存存储的通知。
EN
Unregisters origin from receiving notifications for cache storage.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 安全来源。 | ENSecurity origin. |
🔨Storage.untrackCacheStorageForStorageKey
取消注册存储密钥,使其不再接收缓存存储的通知。
EN
Unregisters storage key from receiving notifications for cache storage.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| storageKey | ✔️ | | string | 存储键。 | ENStorage key. |
🔨Storage.untrackIndexedDBForOrigin
取消注册源以接收 IndexedDB 的通知。
EN
Unregisters origin from receiving notifications for IndexedDB.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 安全来源。 | ENSecurity origin. |
🔨Storage.untrackIndexedDBForStorageKey
从接收 IndexedDB 通知中取消注册存储密钥。
EN
Unregisters storage key from receiving notifications for IndexedDB.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| storageKey | ✔️ | | string | 存储键。 | ENStorage key. |
🔨Storage.getStorageKeyForFrame❌️
给定一个帧ID,返回一个存储密钥。已弃用。请改用Storage.getStorageKey。
EN
Returns a storage key given a frame id. Deprecated. Please use Storage.getStorageKey instead.
🔨Storage.clearSharedStorageEntries🧪
清除给定来源的共享存储中的所有条目。
EN
Clears all entries for a given origin's shared storage.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| ownerOrigin | ✔️ | | string | | |
🔨Storage.clearTrustTokens🧪
移除由指定issuerOrigin颁发的所有Trust Tokens。其他存储数据(包括该发行方的赎回记录)将保持不变。
EN
Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| issuerOrigin | ✔️ | | string | | |
| 返回对象 | 类型 | 描述 | 原文 |
|---|
| didDeleteTokens | boolean | 如果任何令牌被删除则为真,否则为假。 | ENTrue if any tokens were deleted, false otherwise. |
🔨Storage.deleteSharedStorageEntry🧪
删除给定来源共享存储中键为key的条目(如果存在)。
EN
Deletes entry for key (if it exists) for a given origin's shared storage.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| ownerOrigin | ✔️ | | string | | |
| key | ✔️ | | string | | |
🔨Storage.deleteStorageBucket🧪
删除具有给定存储密钥和存储桶名称的存储桶。
EN
Deletes the Storage Bucket with the given storage key and bucket name.
返回页面及其嵌入资源中与现有宽限期URL模式规则匹配的URL列表。https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| firstPartyUrl | ✔️ | | string | 当前正在访问的页面的URL。 | ENThe URL of the page currently being visited. |
| thirdPartyUrls | ✔️ | | array[string] | 页面中嵌入资源的URL列表。 | ENThe list of embedded resource URLs from the page. |
| 返回对象 | 类型 | 描述 | 原文 |
|---|
| matchedUrls | array[string] | 匹配的URL数组。如果存在第一方URL的主模式匹配,则数组中仅返回第一方URL。 | ENArray of matching URLs. If there is a primary pattern match for the first- party URL, only the first-party URL is returned in the array. |
🔨Storage.getInterestGroupDetails🧪
获取指定兴趣组的详细信息。
EN
Gets details for a named interest group.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| ownerOrigin | ✔️ | | string | | |
| name | ✔️ | | string | | |
返回此配置 文件在浏览器会话中使用的有效相关网站集。有效相关网站集在浏览器会话期间不会改变。
EN
Returns the effective Related Website Sets in use by this profile for the browser session. The effective Related Website Sets will not change during a browser session.
🔨Storage.getSharedStorageEntries🧪
获取给定来源的共享存储中的条目。
EN
Gets the entries in an given origin's shared storage.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| ownerOrigin | ✔️ | | string | | |
获取一个源(origin)的共享存储的元数据。
EN
Gets metadata for an origin's shared storage.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| ownerOrigin | ✔️ | | string | | |
🔨Storage.getStorageKey🧪
返回给定框架的存储键。若未提供框架ID,则返回执行此命令的目标框架的存储键。
EN
Returns storage key for the given frame. If no frame ID is provided, the storage key of the target executing this command is returned.
🔨Storage.getTrustTokens🧪
返回当前浏览上下文中每个发行方存储的Trust Tokens数量。
EN
Returns the number of stored Trust Tokens per issuer for the current browsing context.
🔨Storage.overrideQuotaForOrigin🧪
为指定源''覆盖配额
EN
Override quota for the specified origin
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 安全来源。 | ENSecurity origin. |
| quotaSize | | | number | 用于覆盖原始配额的配额大小(以字节为单位)。如果多次调用此方法,覆盖后的配额将等于最后一次调用中提供的 quotaSize。如果调用时未指定 quotaSize,则配额将重置为指定 origin 的默认值。如果使用不同的 origin 多次调用此方法,每个 origin 的覆盖设置将保持有效,直到被禁用(即调用时不指定 quotaSize)。 | ENThe quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize). |
🔨Storage.resetSharedStorageBudget🧪
为ownerOrigin重置预算,清除所有预算提款。
EN
Resets the budget for ownerOrigin by clearing all budget withdrawals.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| ownerOrigin | ✔️ | | string | | |
🔨Storage.runBounceTrackingMitigations🧪
立即删除被识别为潜在反弹跟踪器的网站状态。
EN
Deletes state for sites identified as potential bounce trackers, immediately.
| 返回对象 | 类型 | 描述 | 原文 |
|---|
| deletedSites | array[string] | | |
🔨Storage.sendPendingAttributionReports🧪
立即发送所有待处理的归因报告,无论其预定的报告时间如何。
EN
Sends all pending Attribution Reports immediately, regardless of their scheduled report time.
| 返回对象 | 类型 | 描述 | 原文 |
|---|
| numSent | integer | 已发送的报告数量。 | ENThe number of reports that were sent. |
🔨Storage.setAttributionReportingLocalTestingMode🧪
https://wicg.github.io/attribution-reporting-api/
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| enabled | ✔️ | | boolean | 如果启用,将抑制噪音并立即发送报告。 | ENIf enabled, noise is suppressed and reports are sent immediately. |
🔨Storage.setAttributionReportingTracking🧪
启用/禁用 Attribution Reporting 事件的发布。
EN
Enables/disables issuing of Attribution Reporting events.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| enable | ✔️ | | boolean | | |
🔨Storage.setInterestGroupAuctionTracking🧪
启用/禁用 interestGroupAuctionEventOccurred 和 interestGroupAuctionNetworkRequestCreated 的触发。
EN
Enables/Disables issuing of interestGroupAuctionEventOccurred and interestGroupAuctionNetworkRequestCreated.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| enable | ✔️ | | boolean | | |
🔨Storage.setInterestGroupTracking🧪
启用/禁用 interestGroupAccessed 事件的触发。
EN
Enables/Disables issuing of interestGroupAccessed events.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| enable | ✔️ | | boolean | | |
🔨Storage.setSharedStorageEntry🧪
为指定来源的共享存储设置键为key、值为value的条目。
EN
Sets entry with key and value for a given origin's shared storage.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| ownerOrigin | ✔️ | | string | | |
| key | ✔️ | | string | | |
| value | ✔️ | | string | | |
| ignoreIfPresent | | | boolean | 如果ignoreIfPresent被包含且为真,那么只有当key不存在时才会设置条目。 | ENIf ignoreIfPresent is included and true, then only sets the entry if key doesn't already exist. |
🔨Storage.setSharedStorageTracking🧪
启用/禁用 sharedStorageAccessed 事件的触发。
EN
Enables/disables issuing of sharedStorageAccessed events.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| enable | ✔️ | | boolean | | |
🔨Storage.setStorageBucketTracking🧪
为存储密钥的存储桶设置跟踪。
EN
Set tracking for a storage key's buckets.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| storageKey | ✔️ | | string | | |
| enable | ✔️ | | boolean | | |
✅️️ Events
👋Storage.cacheStorageContentUpdated
缓存的内容已被修改。
EN
A cache's contents have been modified.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 要更新的源。 | ENOrigin to update. |
| storageKey | ✔️ | | string | 要更新的存储密钥。 | ENStorage key to update. |
| bucketId | ✔️ | | string | 要更新的存储桶。 | ENStorage bucket to update. |
| cacheName | ✔️ | | string | 源中的缓存名称。 | ENName of cache in origin. |
👋Storage.cacheStorageListUpdated
一个缓存已被添加/删除。
EN
A cache has been added/deleted.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 需要更新的来源。 | ENOrigin to update. |
| storageKey | ✔️ | | string | 要更新的存储密钥。 | ENStorage key to update. |
| bucketId | ✔️ | | string | 要更新的存储桶。 | ENStorage bucket to update. |
👋Storage.indexedDBContentUpdated
该源的IndexedDB对象存储已被修改。
EN
The origin's IndexedDB object store has been modified.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 需要更新的来源。 | ENOrigin to update. |
| storageKey | ✔️ | | string | 要更新的存储密钥。 | ENStorage key to update. |
| bucketId | ✔️ | | string | 要更新的存储桶。 | ENStorage bucket to update. |
| databaseName | ✔️ | | string | 要更新的数据库。 | ENDatabase to update. |
| objectStoreName | ✔️ | | string | 要更新的ObjectStore。 | ENObjectStore to update. |
👋Storage.indexedDBListUpdated
该源的IndexedDB数据库列表已被修改。
EN
The origin's IndexedDB database list has been modified.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| origin | ✔️ | | string | 需要更新的来源。 | ENOrigin to update. |
| storageKey | ✔️ | | string | 要更新的存储键。 | ENStorage key to update. |
| bucketId | ✔️ | | string | 要更新的存储桶。 | ENStorage bucket to update. |
👋Storage.interestGroupAccessed
其中一个兴趣组被访问。请注意,这些事件对于共享兴趣组存储的所有目标都是全局的。
EN
One of the interest groups was accessed. Note that these events are global to all targets sharing an interest group store.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| accessTime | ✔️ | | Network.TimeSinceEpoch | | |
| type | ✔️ | | InterestGroupAccessType | | |
| ownerOrigin | ✔️ | | string | | |
| name | ✔️ | | string | | |
| componentSellerOrigin | | | string | 对于topLevelBid/topLevelAdditionalBid,以及在适当时机,win和additionalBidWin | ENFor topLevelBid/topLevelAdditionalBid, and when appropriate, win and additionalBidWin |
| bid | | | number | 对于''或``中的内容,请勿修改。对于投标或类似投标事件,如果在本地完成而非在服务器上。 | ENFor bid or somethingBid event, if done locally and not on a server. |
| bidCurrency | | | string | | |
| uniqueAuctionId | | | InterestGroupAuctionId | 对于非全局事件 --- 指向interestGroupAuctionEvent的链接 | ENFor non-global events --- links to interestGroupAuctionEvent |
👋Storage.interestGroupAuctionEventOccurred
一场涉及利益群体的拍卖正在进行。这些事件是目标特定的。
EN
An auction involving interest groups is taking place. These events are target-specific.
👋Storage.interestGroupAuctionNetworkRequestCreated
指定特定网络请求可能关联的拍卖活动及其角色。请注意,该事件与Network.requestWillBeSent无顺序关联(但会在loadingFinished或loadingFailed之前触发)。
EN
Specifies which auctions a particular network fetch may be related to, and in what role. Note that it is not ordered with respect to Network.requestWillBeSent (but will happen before loadingFinished loadingFailed).
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| type | ✔️ | | InterestGroupAuctionFetchType | | |
| requestId | ✔️ | | Network.RequestId | | |
| auctions | ✔️ | | array[InterestGroupAuctionId] | 这是使用发出此请求的工作集(worklet)的一组拍卖(auctions)。在可信信号(trusted signals)的情况下,可能只有其中一部分拍卖真正关心被查询的密钥(keys)。 | ENThis is the set of the auctions using the worklet that issued this request. In the case of trusted signals, it's possible that only some of them actually care about the keys being queried. |
👋Storage.sharedStorageAccessed
关联页面访问了共享存储。以下参数包含在所有事件中。
EN
Shared storage was accessed by the associated page. The following parameters are included in all events.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| accessTime | ✔️ | | Network.TimeSinceEpoch | 访问时间。 | ENTime of the access. |
| scope | ✔️ | | SharedStorageAccessScope | 指示访问范围的枚举值。 | ENEnum value indicating the access scope. |
| method | ✔️ | | SharedStorageAccessMethod | 枚举值,表示调用的 Shared Storage API 方法。 | ENEnum value indicating the Shared Storage API method invoked. |
| mainFrameId | ✔️ | | Page.FrameId | 主框架树根节点的DevTools框架令牌。 | ENDevTools Frame Token for the primary frame tree's root. |
| ownerOrigin | ✔️ | | string | 拥有Shared Storage数据的源的序列化 。 | ENSerialization of the origin owning the Shared Storage data. |
| ownerSite | ✔️ | | string | 拥有共享存储数据的站点的序列化。 | ENSerialization of the site owning the Shared Storage data. |
| params | ✔️ | | SharedStorageAccessParams | params 所包含的子参数均为可选,其存在与否取决于 type。 | ENThe sub-parameters wrapped by params are all optional and their presence/absence depends on type. |
👋Storage.sharedStorageWorkletOperationExecutionFinished
一个共享存储运行或selectURL操作已完成其执行。以下参数包含在所有事件中。
EN
A shared storage run or selectURL operation finished its execution. The following parameters are included in all events.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| finishedTime | ✔️ | | Network.TimeSinceEpoch | 操作完成的时间。 | ENTime that the operation finished. |
| executionTime | ✔️ | | integer | 时间,以微秒为单位,从共享存储JS API调用开始,直到工作线程中操作执行结束。 | ENTime, in microseconds, from start of shared storage JS API call until end of operation execution in the worklet. |
| method | ✔️ | | SharedStorageAccessMethod | 枚举值,表示调用的 Shared Storage API 方法。 | ENEnum value indicating the Shared Storage API method invoked. |
| operationId | ✔️ | | string | 操作调用的ID。 | ENID of the operation call. |
| workletTargetId | ✔️ | | Target.TargetID | DevTools令牌的十六进制表示,用作关联共享存储工作线程的TargetID。 | ENHex representation of the DevTools token used as the TargetID for the associated shared storage worklet. |
| mainFrameId | ✔️ | | Page.FrameId | 主框架树根节点的DevTools框架令牌。 | ENDevTools Frame Token for the primary frame tree's root. |
| ownerOrigin | ✔️ | | string | 拥有共享存储数据的源的序列化。 | ENSerialization of the origin owning the Shared Storage data. |
👋Storage.storageBucketCreatedOrUpdated
👋Storage.storageBucketDeleted
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| bucketId | ✔️ | | string | | |
👋Storage.attributionReportingReportSent🧪
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| url | ✔️ | | string | | |
| body | ✔️ | | object | | |
| result | ✔️ | | AttributionReportingReportResult | | |
| netError | | | integer | 如果结果为 sent,则填充网络/HTTP状态。 | ENIf result is sent, populated with net/HTTP status. |
| netErrorName | | | string | | |
| httpStatusCode | | | integer | | |
👋Storage.attributionReportingSourceRegistered🧪
👋Storage.attributionReportingTriggerRegistered🧪
👋Storage.attributionReportingVerboseDebugReportSent🧪
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|
| url | ✔️ | | string | | |
| body | | | array[object] | | |
| netError | | | integer | | |
| netErrorName | | | string | | |
| httpStatusCode | | | integer | | |
✅️️ Types
📌Storage.InterestGroupAccessType
兴趣群组访问类型的枚举。
允许的值:join、leave、update、loaded、bid、win、additionalBid、additionalBidWin、topLevelBid、topLevelAdditionalBid、clear
EN
Enum of interest group access types.
Allowed Values: join, leave, update, loaded, bid, win, additionalBid, additionalBidWin, topLevelBid, topLevelAdditionalBid, clear
返回类型:string
📌Storage.InterestGroupAuctionEventType