Skip to content

Throttling/pausing of Mutation Events #221

Closed
@eoghanmurray

Description

@eoghanmurray

I'm just wondering whether there has been any effort, or rejected effort, to add throttling and/or grouping to the MutationObserver.

I'm recording a website which has an image carousel which transitions images via a setInterval script, so every second, dozens of new mutation events are being generated without any user actions.
All the mutations are happening on the style attribute, so there's quite a lot of commonality between the events, which suggests a few different 'packing' strategies, but before delving into this level of complexity, I'm wondering whether an API method to pause mutation tracking would be useful?

This could be triggered by e.g. https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API so that if a user isn't actually on the page, then mutation events will be batched up until they return.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions