Skip to content

Commit b3e7ced

Browse files
committed
doc: update README
1 parent 1665c53 commit b3e7ced

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ for (const key of ["background-color", "width", "margin-left"]) {
6060
console.log(`${key}:`, computed[key]);
6161
}
6262

63-
// Read elements like in browser
63+
// Read elements in DOM syntax
6464
const bodyHtml = body.outerHTML;
6565
const html = body.parentNode;
6666
const h1 = body.querySelector("h1");
@@ -74,3 +74,25 @@ console.log(body.tracked); // false
7474
```
7575

7676
See `examples/` for full scripts.
77+
78+
## Sync $0 (experimental)
79+
80+
To use `inspector.$0`, install the extension in [./extension](./extension)`. Also avaliable on [chrome web store](https://chromewebstore.google.com/detail/chrome-inspector-sync/jgiapjeogionjfbonpiamipcedcnohha).
81+
82+
The extension is included in the package. Import `CHROME_INSPECTOR_SYNC_EXTENSION_PATH` to get its path. This is useful for automation frameworks like Puppeteer or Playwright to launch with extensions.
83+
84+
## TODO
85+
86+
1. CSS properties add/edit
87+
- Key CDP commands: `CSS.addRule`, `CSS.setStyleSheetText`, `CSS.getStyleSheetText`
88+
- Use raw response's [StyleSheetId](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#type-StyleSheetId) and [SourceRange](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#type-SourceRange)
89+
2. Better DOM mutation API support
90+
- Many setters like `.outerHTML = ...` cannot be async. Possibly have to be `setOuterHTML()`?
91+
3. Shadow DOM support
92+
4. Other debugging utilities (ex: console message as event, DOM breakpoint, etc)
93+
94+
## Contributing
95+
96+
We welcome contributions in any form, including bug reports, pull requests, feature requests, and more.
97+
98+
For pull requests, please use [conventional commits](https://conventionalcommits.org/).

0 commit comments

Comments
 (0)