Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

capture-website

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capture-website - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

9

index.d.ts
/// <reference lib="dom"/>
import {SetCookie, LaunchOptions, Page, Browser, Headers} from 'puppeteer';
import {SetCookie, LaunchOptions, Page, Browser, Headers, EvaluateFn} from 'puppeteer';

@@ -168,2 +168,9 @@ declare namespace captureWebsite {

/**
Inject a function to be executed prior to navigation.
This can be useful for [altering the JavaScript environment](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pageevaluateonnewdocumentpagefunction-args). For example, you could define a global method on the `window`, overwrite `navigator.languages` to change the language presented by the browser, or mock `Math.random` to return a fixed value.
*/
readonly preloadFunction?: EvaluateFn;
/**
Inject [JavaScript modules](https://developers.google.com/web/fundamentals/primers/modules) into the page.

@@ -170,0 +177,0 @@

@@ -184,2 +184,6 @@ /* global document */

if (options.preloadFunction) {
await page.evaluateOnNewDocument(options.preloadFunction);
}
await page.setJavaScriptEnabled(options.isJavaScriptEnabled);

@@ -186,0 +190,0 @@

2

package.json
{
"name": "capture-website",
"version": "1.3.0",
"version": "1.4.0",
"description": "Capture screenshots of websites",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -479,2 +479,11 @@ # capture-website

##### preloadFunction
Type: `string | Function`\
Default: `undefined`
Inject a function to be executed prior to navigation.
This can be useful for [altering the JavaScript environment](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pageevaluateonnewdocumentpagefunction-args). For example, you could define a global method on the `window`, overwrite `navigator.languages` to change the language presented by the browser, or mock `Math.random` to return a fixed value.
### captureWebsite.devices

@@ -481,0 +490,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc