add the inline stylesheet option when recording

This commit is contained in:
Yanzhen Yu
2019-05-12 21:10:34 +08:00
parent adaeed0227
commit 107296eee3
5 changed files with 15 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ function record(options: recordOptions = {}): listenerHandler | undefined {
checkoutEveryNth,
blockClass = 'rr-block',
ignoreClass = 'rr-ignore',
inlineStylesheet = true,
} = options;
// runtime checks for user options
if (!emit) {
@@ -62,7 +63,7 @@ function record(options: recordOptions = {}): listenerHandler | undefined {
}),
isCheckout,
);
const [node, idNodeMap] = snapshot(document, blockClass);
const [node, idNodeMap] = snapshot(document, blockClass, inlineStylesheet);
if (!node) {
return console.warn('Failed to snapshot the document');
}
@@ -160,6 +161,7 @@ function record(options: recordOptions = {}): listenerHandler | undefined {
),
blockClass,
ignoreClass,
inlineStylesheet,
}),
);
};