Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Deprecate meta-events #82

Closed
marcospassos opened this issue Jun 28, 2019 · 0 comments
Closed

[Proposal] Deprecate meta-events #82

marcospassos opened this issue Jun 28, 2019 · 0 comments

Comments

@marcospassos
Copy link
Contributor

marcospassos commented Jun 28, 2019

I want to propose deprecating the meta-attributes such as isSvg, isStyle, etc. The main reason behind this proposal is that it makes it easier for those migrating from another recording tool to RRWeb. I believe that these meta-attributes can be inferred at replay-time by inspecting the parent nodes in a backward-compatible manner.

For <svg> tags, the rebuild logic checks whether it is an instance of an SVGElement, and then create the element with the SVG namespace. I believe, however, it's not strictly needed: for every element C that is a child of another element P, if P is an SVGElement then C is also an SVGElement. That said, during replay, we can just check if the parent element is an instance of SVGElement instead of looking at the isSvg flag.
We can use the same logic for the isStyle, but checking if the parent is an <style> element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants