rrweb-io / rrweb-snapshot

rrweb's snapshot and rebuild module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

srcset attribute is not converted to absolute path during the snapshot phase

IMFIL opened this issue · comments

commented

Hey everyone.

The srcset attribute on img tags are not converted into absolute path.

This:
Screen Shot 2019-09-24 at 10 49 02 AM

gets converted to this:

Screen Shot 2019-09-24 at 10 50 59 AM

The resulting DOM element should have an absolute path in the srcset attribute.

Would this solve it ?

        if (name === 'src' || name === 'href' || name === "srcset") {
          attributes[name] = absoluteToDoc(doc, value);
        } else if (name === 'style') {
          attributes[name] = absoluteToStylesheet(value, location.href);
        } else {
          attributes[name] = value;
        }
      }