Skip to content

Commit

Permalink
release: v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Dec 17, 2022
1 parent 2fe8c15 commit 196f304
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.4.3 (17 Dec 2022)

* feat: support DOM.getNode

## 1.4.2 (11 Dec 2022)

* fix: dom highlighter style encapsulation
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chobitsu",
"version": "1.4.2",
"version": "1.4.3",
"description": "Chrome devtools protocol JavaScript implementation",
"main": "dist/chobitsu.js",
"exports": {
Expand Down
8 changes: 8 additions & 0 deletions src/domains/DOM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ export function getDOMNodeId(params: any) {
}
}

export function getDOMNode(params: any) {
const { nodeId } = params

return {
node: getNode(nodeId),
}
}

function parseAttributes(str: string) {
str = `<div ${str}></div>`

Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ chobitsu.register('Runtime', {
chobitsu.register('DOM', {
...DOM,
getNodeId: DOM.getDOMNodeId,
getNode: DOM.getDOMNode,
markUndoableState: noop,
undo: noop,
getBoxModel: noop,
Expand Down

0 comments on commit 196f304

Please sign in to comment.