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

Add Chromium versions for MutationRecord API #12457

Merged
merged 3 commits into from
Sep 28, 2021

Conversation

queengooborg
Copy link
Contributor

@queengooborg queengooborg commented Sep 17, 2021

This PR adds real values for Chromium (Chrome, Opera, Samsung Internet, WebView Android) for the MutationRecord API, based upon commit history and date.

Commits: https://source.chromium.org/chromium/chromium/src/+/312007166b154657025bd14c72574888e2779076
https://source.chromium.org/chromium/chromium/src/+/4e5368c3ba5b6cdf4a878fe39888f090d77dc585

This PR adds real values for Chromium (Chrome, Opera, Samsung Internet, WebView Android) for the `MutationRecord` API, based upon commit history and date.

Commit: https://source.chromium.org/chromium/chromium/src/+/312007166b154657025bd14c72574888e2779076
@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 17, 2021
@foolip
Copy link
Contributor

foolip commented Sep 17, 2021

This doesn't match https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/takeRecords#browser_compatibility, what does takeRecords() in Chrome 18-27 if this is correct?

@queengooborg
Copy link
Contributor Author

queengooborg commented Sep 21, 2021

The commit history indicates that the takeRecords member always returned a MutationRecord object (https://source.chromium.org/chromium/chromium/src/+/4e5368c3ba5b6cdf4a878fe39888f090d77dc585) since it was implemented in Chrome 20, but oddly enough the collector also indicates that the MutationRecord interface was implemented in Chrome 28.

I'll set this to Chrome 20 accordingly!

foolip
foolip previously approved these changes Sep 21, 2021
Copy link
Contributor

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking out the discrepancy!

I wasn't totally sure about the takeRecords() data, but I could confirm Chrome 20 using the updated tests in foolip/mdn-bcd-collector#1511.

@foolip foolip dismissed their stale review September 21, 2021 16:36

Hold up!

@foolip
Copy link
Contributor

foolip commented Sep 21, 2021

Oh, wait, actually takeRecords() isn't the oldest way to get a MutationRecord, which explains why the interface wasn't added in https://source.chromium.org/chromium/chromium/src/+/4e5368c3ba5b6cdf4a878fe39888f090d77dc585.

Before this, MutationRecord instances were delivered via the callback. So maybe a custom test is needed here, or source inspection to see if all of the members of MutationRecord were present from the beginning.

@queengooborg
Copy link
Contributor Author

I'm unsure what callback are you referring to, could you clarify?

@foolip
Copy link
Contributor

foolip commented Sep 24, 2021

That's the first argument to the MutationObserver constructor.

@foolip foolip merged commit ea9bf0b into mdn:main Sep 28, 2021
@queengooborg queengooborg deleted the api/MutationRecord/chrome branch September 28, 2021 18:13
foolip added a commit to foolip/browser-compat-data that referenced this pull request Jul 13, 2022
These are all cases where the source data was updated but the mirrored
data wasn't updated. Assume that the changes in the PRs are correct and
use "mirror" to get the data in sync again.

AudioContext: mdn#1579

CSSTransition: mdn#6707

DOMTokenList: mdn#6568

MutationRecord: mdn#12457

RTCDataChannelEvent: mdn#12895

Response: mdn#12579
queengooborg pushed a commit that referenced this pull request Jul 13, 2022
These are all cases where the source data was updated but the mirrored
data wasn't updated. Assume that the changes in the PRs are correct and
use "mirror" to get the data in sync again.

AudioContext: #1579

CSSTransition: #6707

DOMTokenList: #6568

MutationRecord: #12457

RTCDataChannelEvent: #12895

Response: #12579
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants