Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,17 @@ added:

Use this flag to enable [ShadowRealm][] support.

### `--experimental-storage-inspection`

<!-- YAML
added:
- REPLACEME
-->

> Stability: 1.1 - Active Development

Enable experimental support for storage inspection

### `--experimental-test-coverage`

<!-- YAML
Expand Down
97 changes: 97 additions & 0 deletions doc/api/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,103 @@ setNetworkResources().then(() => {

For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource)

### `inspector.DOMStorage.domStorageItemAdded`

<!-- YAML
added:
- REPLACEME
-->

* `params` {Object}
* `storageId` {Object}
* `securityOrigin` {string}
* `storageKey` {string}
* `isLocalStorage` {boolean}
* `key` {string}
* `newValue` {string}

This feature is only available with the
`--experimental-storage-inspection` flag enabled.

Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends.
This event indicates that a new item has been added to the storage.

### `inspector.DOMStorage.domStorageItemRemoved`

<!-- YAML
added:
- REPLACEME
-->

* `params` {Object}
* `storageId` {Object}
* `securityOrigin` {string}
* `storageKey` {string}
* `isLocalStorage` {boolean}
* `key` {string}

This feature is only available with the
`--experimental-storage-inspection` flag enabled.

Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends.
This event indicates that an item has been removed from the storage.

### `inspector.DOMStorage.domStorageItemUpdated`

<!-- YAML
added:
- REPLACEME
-->

* `params` {Object}
* `storageId` {Object}
* `securityOrigin` {string}
* `storageKey` {string}
* `isLocalStorage` {boolean}
* `key` {string}
* `oldValue` {string}
* `newValue` {string}

This feature is only available with the
`--experimental-storage-inspection` flag enabled.

Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends.
This event indicates that a storage item has been updated.

### `inspector.DOMStorage.domStorageItemsCleared`

<!-- YAML
added:
- REPLACEME
-->

* `params` {Object}
* `storageId` {Object}
* `securityOrigin` {string}
* `storageKey` {string}
* `isLocalStorage` {boolean}

This feature is only available with the
`--experimental-storage-inspection` flag enabled.

Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected
frontends. This event indicates that all items have been cleared from the
storage.

### `inspector.DOMStorage.registerStorage`

<!-- YAML
added:
- REPLACEME
-->

* `params` {Object}
* `isLocalStorage` {boolean}
* `storageMap` {Object}

This feature is only available with the
`--experimental-storage-inspection` flag enabled.

## Support of breakpoints

The Chrome DevTools Protocol [`Debugger` domain][] allows an
Expand Down
4 changes: 4 additions & 0 deletions doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ Enable the experimental QUIC support.
.
.It Fl -experimental-inspector-network-resource
Enable experimental support for inspector network resources.

.It Fl -experimental-storage-inspection
Enable experimental support for storage inspection.

.
.It Fl -force-context-aware
Disable loading native addons that are not context-aware.
Expand Down
11 changes: 11 additions & 0 deletions lib/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ const NetworkResources = {
put,
};

const DOMStorage = {
domStorageItemAdded: (params) => broadcastToFrontend('DOMStorage.domStorageItemAdded', params),
domStorageItemRemoved: (params) => broadcastToFrontend('DOMStorage.domStorageItemRemoved', params),
domStorageItemUpdated: (params) => broadcastToFrontend('DOMStorage.domStorageItemUpdated', params),
domStorageItemsCleared: (params) => broadcastToFrontend('DOMStorage.domStorageItemsCleared', params),
// Pseudo-event: not part of the CDP DOMStorage domain.
// Call DOMStorageAgent::registerStorage in inspector/dom_storage_agent.cc.
registerStorage: (params) => broadcastToFrontend('DOMStorage.registerStorage', params),
};

module.exports = {
open: inspectorOpen,
close: _debugEnd,
Expand All @@ -238,4 +248,5 @@ module.exports = {
Session,
Network,
NetworkResources,
DOMStorage,
};
Loading
Loading