Optional
algorithmAn optional string specifying the hashing algorithm to be used.
Supported algorithms include:
- 'sha256'
: A widely-used cryptographic hash function.
- 'murmur3'
: A non-cryptographic hash function known for its speed.
- 'blake3'
: A fast cryptographic hash function designed for performance.
- 'simhash'
: An algorithm for similarity hashing used in machine learning.
- 'minhash'
: An algorithm used for estimating the similarity between datasets.
Optional
corsAn optional string specifying a CORS proxy URL to be used when fetching external resources (e.g., stylesheets, scripts) during the hashing process. This is useful for handling cross-origin requests and ensuring that all necessary resources are accessible.
Optional
includeAn optional array of strings specifying which attributes should be included in the hash calculation. This allows for fine-tuning of the hashed output based on specific attributes of interest.
Optional
includeAn optional boolean flag indicating whether to include data-* and ARIA attributes in the hashing process. If set to true, these attributes will be considered in the hash.
Optional
layoutAn optional boolean flag indicating if the hashing operation should consider layout information. If true, the hash will reflect changes in layout, which can be significant for responsive designs.
Optional
puppeteerOptions for connecting Puppeteer to a remote browser. Either browserWSEndpoint or browserURL can be provided.
Optional
resilienceAn optional boolean flag that indicates whether to evaluate and include resilience metrics in the hash result. Setting this to true will incorporate aspects of structural integrity into the hashing process.
Optional
shapeAn optional boolean flag that determines whether to generate a shape vector for the DOM structure. When true, the shape of the DOM will be represented as a vector, which may help in analyzing the layout or arrangement of elements.
Optional
useUse an existing Chrome instance via Puppeteer.
Represents the options available for configuring a DOM hashing operation. The
DomHashOptions
interface allows users to customize the behavior of the hashing process, including the choice of algorithm, attributes to include, and various flags that influence how the DOM is processed.DomHashOptions