Allow blocking elements by selector (#50)

* Extract method (isElementBlocked) and add tests

* Add blockSelector argument to snapshot

If blockSelector is passed, it will be matched against the element.

Reasoning: Mutating class names can get messy, so providing another hook
helps keep code clean by using data-attributes instead.
This commit is contained in:
Karl-Aksel Puulmann
2020-10-24 10:11:39 +02:00
committed by GitHub
parent 14bdd67459
commit 036d3df692
4 changed files with 61 additions and 13 deletions

View File

@@ -34,12 +34,14 @@
"homepage": "https://github.com/rrweb-io/rrweb-snapshot#readme",
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/jsdom": "^16.2.4",
"@types/mocha": "^5.2.5",
"@types/node": "^10.11.3",
"@types/puppeteer": "^1.12.4",
"chai": "^4.1.2",
"cross-env": "^5.2.0",
"jest-snapshot": "^23.6.0",
"jsdom": "^16.4.0",
"mocha": "^5.2.0",
"puppeteer": "^1.15.0",
"rollup": "^0.66.4",