Skip to content

Commit

Permalink
release: v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Aug 15, 2022
1 parent 7d5b7b4 commit e7b7a64
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.0 (15 Aug 2022)

* feat: proxy support

## 1.2.1 (7 Aug 2022)

* fix: css text empty if value contains special char
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.2.1",
"version": "1.3.0",
"description": "Chrome devtools protocol JavaScript implementation",
"main": "dist/chobitsu.js",
"files": [
Expand Down
8 changes: 7 additions & 1 deletion src/domains/Page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export async function getResourceContent(params: any) {

let screenshotTimer: any
let ack: Readiness
const screencastInterval = 2000
let screencastInterval = 2000
let isCapturingScreenshot = false

export function screencastFrameAck() {
Expand Down Expand Up @@ -196,7 +196,13 @@ async function captureScreenshot() {
options.useCORS = true
}

const time = now()
const canvas = await html2canvas(document.body, options)
const duration = now() - time
screencastInterval = 2000
if (duration * 5 > screencastInterval) {
screencastInterval = duration * 5
}

const data = canvas
.toDataURL('image/jpeg')
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"lib": ["DOM", "ES2015"]
},
"include": ["src/**/*"]
}
}

0 comments on commit e7b7a64

Please sign in to comment.