Container Timing: rename containertiming-ignore to containertimingignore
The standard discussion [1] concluded that a dashed HTML content
attribute is inappropriate for the ignore marker. It should be spelled
`containertimingignore` (no dash), consistent with how HTML content
attributes are conventionally named. The JS accessor remains
`containerTimingIgnore`.
[1] https://github.com/WICG/container-timing/issues/65
With this change, `containertimingignore` is now the functional
attribute as. The legacy dashed `containertiming-ignore` spelling is
kept registered without effects: it only fires a new
kContainerTimingIgnoreDashedAttribute use counter so remaining usage
can be tracked and the attribute removed once it drains to zero.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi José, can you please list what files each reviewer needs to review? Or, maybe we could start with just one primary reviewer and then add the others for enums.xml/web_feature.mojom stamps?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi José, can you please list what files each reviewer needs to review? Or, maybe we could start with just one primary reviewer and then add the others for enums.xml/web_feature.mojom stamps?
Sorry, I realized Scott Hasseley can review all. I got a bit confused. I will withdraw most of the review requests.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
attribute as. The legacy dashed `containertiming-ignore` spelling isDid this get cut off (may "as" isn't needed)?
kept registered without effects: it only fires a new
kContainerTimingIgnoreDashedAttribute use counter so remaining usage
can be tracked and the attribute removed once it drains to zero.A couple thoughts/questions:
I'm not sure there's an advantage to keeping the old attribute around only for the UseCounter since removing it would be functionally equivalent (I think). That is, using "containertiming-ignore" on a site should have no effect if you remove the attribute (i.e. it shouldn't cause an error).
That said, this is a breaking change, so this won't this affect Origin Trial users? It won't cause errors, but the behavior will change. I think there are a few strategies:
1. Wait until after the OT ends and remove it (without UseCounter). That's typically a good time to make breaking changes.
2. Map containertiming-ignore to containertiming so they both work, and then remove containertiming-ignore once the OT ends. This is safer than removing now, but it adds more complexity to the code that is maybe necessary.
3. Make the change now (M153), but inform OT participants about the change so they can update their sites. They would probably need to have both attributes for a while to support old versions of Chrome (otherwise they'll need to potentially filter out results from older versions).
Is there a UseCounter for this attribute? That might help decide.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
attribute as. The legacy dashed `containertiming-ignore` spelling isDid this get cut off (may "as" isn't needed)?
I rewrote the sentence 2-3 times then still was lucky enough to introduce this spelling! The new paragraph is way different now and does not include the same sentence.
kept registered without effects: it only fires a new
kContainerTimingIgnoreDashedAttribute use counter so remaining usage
can be tracked and the attribute removed once it drains to zero.A couple thoughts/questions:
I'm not sure there's an advantage to keeping the old attribute around only for the UseCounter since removing it would be functionally equivalent (I think). That is, using "containertiming-ignore" on a site should have no effect if you remove the attribute (i.e. it shouldn't cause an error).
That said, this is a breaking change, so this won't this affect Origin Trial users? It won't cause errors, but the behavior will change. I think there are a few strategies:
1. Wait until after the OT ends and remove it (without UseCounter). That's typically a good time to make breaking changes.2. Map containertiming-ignore to containertiming so they both work, and then remove containertiming-ignore once the OT ends. This is safer than removing now, but it adds more complexity to the code that is maybe necessary.3. Make the change now (M153), but inform OT participants about the change so they can update their sites. They would probably need to have both attributes for a while to support old versions of Chrome (otherwise they'll need to potentially filter out results from older versions).Is there a UseCounter for this attribute? That might help decide.
I finally opted for (2):
Once the trial is finished, we just drop the legacy spelling.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
attribute as. The legacy dashed `containertiming-ignore` spelling isJosé Dapena PazDid this get cut off (may "as" isn't needed)?
I rewrote the sentence 2-3 times then still was lucky enough to introduce this spelling! The new paragraph is way different now and does not include the same sentence.
Happens to me all the time 😊.
kept registered without effects: it only fires a new
kContainerTimingIgnoreDashedAttribute use counter so remaining usage
can be tracked and the attribute removed once it drains to zero.José Dapena PazA couple thoughts/questions:
I'm not sure there's an advantage to keeping the old attribute around only for the UseCounter since removing it would be functionally equivalent (I think). That is, using "containertiming-ignore" on a site should have no effect if you remove the attribute (i.e. it shouldn't cause an error).
That said, this is a breaking change, so this won't this affect Origin Trial users? It won't cause errors, but the behavior will change. I think there are a few strategies:
1. Wait until after the OT ends and remove it (without UseCounter). That's typically a good time to make breaking changes.2. Map containertiming-ignore to containertiming so they both work, and then remove containertiming-ignore once the OT ends. This is safer than removing now, but it adds more complexity to the code that is maybe necessary.3. Make the change now (M153), but inform OT participants about the change so they can update their sites. They would probably need to have both attributes for a while to support old versions of Chrome (otherwise they'll need to potentially filter out results from older versions).Is there a UseCounter for this attribute? That might help decide.
I finally opted for (2):
- Only a single use counter shared for them.
- Console warning when using the old spelling. I don't try to deduplicate the warning as that would imply adding a boolean in the window, or using the deprecation infrastructure (that has a lot of commit overhead). Reason is: nobody detected yet using it.
Once the trial is finished, we just drop the legacy spelling.
SGTM. It's not as gross as I thought it might be, and it's nice to get the implementation and tests up-to-date with the resolution.
// measured usage of the attribute is negligible, so per-page dedup state istypo: I think "deduped"?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |