Installations
npm install @saola.ai/rrweb-snapshot
Developer Guide
Typescript
No
Module System
ESM
Node Version
18.19.0
NPM Version
10.2.3
Score
77.4
Supply Chain
99.5
Quality
96.8
Maintenance
100
Vulnerability
100
License
Releases
@rrweb/utils@2.0.0-alpha.18
Published on 06 Dec 2024
@rrweb/types@2.0.0-alpha.18
Published on 06 Dec 2024
rrweb-player@2.0.0-alpha.18
Published on 06 Dec 2024
rrweb-snapshot@2.0.0-alpha.18
Published on 06 Dec 2024
rrweb@2.0.0-alpha.18
Published on 06 Dec 2024
rrvideo@2.0.0-alpha.18
Published on 06 Dec 2024
Contributors
Languages
TypeScript (87.88%)
JavaScript (5.56%)
HTML (4.61%)
Svelte (1.67%)
CSS (0.25%)
Shell (0.03%)
Developer
Download Statistics
Total Downloads
3,517
Last Day
41
Last Week
80
Last Month
595
Last Year
3,517
GitHub Statistics
17,114 Stars
1,279 Commits
1,461 Forks
194 Watching
30 Branches
127 Contributors
Bundle Size
77.89 kB
Minified
25.06 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.0.19
Package Id
@saola.ai/rrweb-snapshot@2.0.19
Unpacked Size
1.77 MB
Size
433.85 kB
File Count
12
NPM Version
10.2.3
Node Version
18.19.0
Publised On
29 Jan 2025
Total Downloads
Cumulative downloads
Total Downloads
3,517
Last day
485.7%
41
Compared to previous day
Last week
48.1%
80
Compared to previous week
Last month
109.5%
595
Compared to previous month
Last year
0%
3,517
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
rrweb-snapshot
Snapshot the DOM into a stateful and serializable data structure. Also, provide the ability to rebuild the DOM via snapshot.
API
This module export following methods:
snapshot
snapshot
will traverse the DOM and return a stateful and serializable data structure which can represent the current DOM view.
There are several things will be done during snapshot:
- Inline some DOM states into HTML attributes, e.g, HTMLInputElement's value.
- Turn script tags into
noscript
tags to avoid scripts being executed. - Try to inline stylesheets to make sure local stylesheets can be used.
- Make relative paths in href, src, CSS to be absolute paths.
- Give an id to each Node, and return the id node map when snapshot finished.
rebuild
rebuild
will build the DOM according to the taken snapshot.
There are several things will be done during rebuild:
- Add data-rrid attribute if the Node is an Element.
- Create some extra DOM node like text node to place inline CSS and some states.
- Add data-extra-child-index attribute if Node has some extra child DOM.
serializeNodeWithId
serializeNodeWithId
can serialize a node into snapshot format with id.
buildNodeWithSN
buildNodeWithSN
will build DOM from serialized node and store serialized information in the mirror.getMeta(node)
.
Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site.
Gold Sponsors 🥇
Silver Sponsors 🥈
Bronze Sponsors 🥉
Backers
Core Team Members
Yuyz0112 |
Yun Feng |
eoghanmurray |
Juice10 open for rrweb consulting |
Who's using rrweb?
No vulnerabilities found.
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
Found 26/27 approved changesets -- score normalized to 9
Reason
9 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci-cd.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Warn: no topLevel permission defined: .github/workflows/style-check.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/ci-cd.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/ci-cd.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/ci-cd.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/release.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/release.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/style-check.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style-check.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/style-check.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/rrweb-io/rrweb/style-check.yml/master?enable=pin
- Info: 0 out of 13 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 29 are checked with a SAST tool
Reason
21 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-mh2x-fcqh-fmqv
- Warn: Project is vulnerable to: GHSA-rjjv-87mx-6x3h
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-96g7-g7g9-jxw8
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-8266-84wp-wv5c
- Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
- Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
4.4
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More