Skip to content

Commit 258e828

Browse files
committed
[cdp] bump playwright for setImmediate fix, add childNodes hack to nodeManager
1 parent 2dc9aca commit 258e828

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

chobitsu/src/domains/Runtime.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export async function callFunctionOn(
5454
const ret: any = {};
5555

5656
if (threw) {
57+
console.error(exception);
5758
ret.exceptionDetails = {
5859
exceptionId: 1,
5960
text: "Uncaught",

chobitsu/src/lib/nodeManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export function wrap(node: any, { depth = 1 } = {}) {
3939
localName: node.localName || '',
4040
nodeValue: node.nodeValue || '',
4141
attributes: [],
42+
childNodes: [],
43+
children: [],
4244
nodeId,
4345
backendNodeId: nodeId,
4446
}

frontend/src/Tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ export class Tab extends StatefulClass {
8383
let injected = false;
8484
frame.addEventListener("contextInit", (ctx) => {
8585
injectContextMenu(ctx.client, this);
86-
injectChobitsu(ctx.client, this, resolver);
8786

8887
// make sure it's top level, ctxInit calls for all frames too
8988
if (ctx.window == frame.frame.contentWindow) {
89+
injectChobitsu(ctx.client, this, resolver);
9090
injectTitleWatcher(ctx.client, this);
9191
injectHistoryEmulation(ctx.client, this);
9292

0 commit comments

Comments
 (0)