Skip to content

[Bug]: Inline images: add load listeners not replace #1172

@pavlogavryliuk

Description

@pavlogavryliuk

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

v2.0.0-alpha.4

Expected Behavior

RRWeb should add additional load listener, not replace current, because some images have default listener. Please, replace image.onload = recordInlineImage to image.addEventListener('load', recordInlineImage).

Actual Behavior

Now RRWeb removes current load listener if inlineImages option is available.

Steps to Reproduce

Popular case for this is: <img style="opacity: 0" onload="this.style.opacity=1" />. After "inlining" this image will be not visible.

Testcase Gist URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions