expose blockSelector as a public option

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 528b8373a0
commit e9a5aeed06
4 changed files with 12 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ function record<T = eventWithTime>(
checkoutEveryNms,
checkoutEveryNth,
blockClass = 'rr-block',
blockSelector = null,
ignoreClass = 'rr-ignore',
inlineStylesheet = true,
maskAllInputs,
@@ -130,6 +131,7 @@ function record<T = eventWithTime>(
mutationBuffer.freeze(); // don't allow any mirror modifications during snapshotting
const [node, idNodeMap] = snapshot(document, {
blockClass,
blockSelector,
inlineStylesheet,
maskAllInputs: maskInputOptions,
recordCanvas,
@@ -289,6 +291,7 @@ function record<T = eventWithTime>(
}),
),
blockClass,
blockSelector,
ignoreClass,
maskInputOptions,
maskInputFn,