Skip to content

Commit

Permalink
chore: small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Aug 27, 2024
1 parent 90ab3be commit 747a5c4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/domains/DOM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ export function getDOMNode(params: any) {
}
}

export function getTopLayerElements(): DOM.GetTopLayerElementsResponse {
return {
nodeIds: [],
}
}

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

Expand Down
17 changes: 17 additions & 0 deletions src/domains/Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,20 @@ export function getTrustTokens(): Storage.GetTrustTokensResponse {
tokens: [],
}
}

export function getStorageKeyForFrame(): Storage.GetStorageKeyForFrameResponse {
return {
storageKey: 'chobitsu',
}
}

export function getSharedStorageMetadata(): Storage.GetSharedStorageMetadataResponse {
return {
metadata: {
creationTime: 0,
length: 0,
remainingBudget: 0,
bytesUsed: 0,
},
}
}
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ chobitsu.register('Page', {
})
chobitsu.register('Runtime', {
...Runtime,
getExceptionDetails: noop,
compileScript: noop,
discardConsoleEntries: noop,
getHeapUsage: noop,
Expand Down Expand Up @@ -114,6 +115,9 @@ chobitsu.register('CacheStorage', {
})
chobitsu.register('Storage', {
...Storage,
setInterestGroupTracking: noop,
setSharedStorageTracking: noop,
setStorageBucketTracking: noop,
untrackCacheStorageForOrigin: noop,
untrackIndexedDBForOrigin: noop,
trackCacheStorageForOrigin: noop,
Expand All @@ -139,5 +143,8 @@ chobitsu.register('HeapProfiler', {
chobitsu.register('Input', {
...Input,
})
chobitsu.register('Autofill', {
enable: noop,
})

export default chobitsu

0 comments on commit 747a5c4

Please sign in to comment.