Skip to content

Commit

Permalink
transform all style attribute value
Browse files Browse the repository at this point in the history
  • Loading branch information
champkeh committed Dec 24, 2021
1 parent 36327d8 commit 7d3e867
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,12 @@ export default class MutationBuffer {
newValue !== old.style.getPropertyValue(pname) ||
newPriority !== old.style.getPropertyPriority(pname)
) {
if (pname === 'background-image') {
// tagName parameter use 'table' in order to call `absoluteToDoc` route internal
newValue = transformAttribute(this.doc, 'table', 'background', newValue)
}
newValue = transformAttribute(
this.doc,
(m.target as HTMLElement).tagName,
m.attributeName,
newValue,
);
if (newPriority === '') {
styleObj[pname] = newValue;
} else {
Expand Down

0 comments on commit 7d3e867

Please sign in to comment.