WICG / element-timing

A proposal for an Element Timing specification.
https://wicg.github.io/element-timing/
Other
58 stars 15 forks source link

Does not work when attribute "elementtiming" has no value #37

Closed jashsayani closed 4 years ago

jashsayani commented 4 years ago

I tried this API in: Chrome 77.0.3865.90

When I have the attribute with no value (<img elementtiming src="http://foo.bar/img.png" />), the observer is not fired. However, when I set a value, like "a" (<img elementtiming="a" src="http://foo.bar/img.png" />), the observer is fired.

This should work when no value is set for the attribute, as apps might not always want to filter by some value, and it adds additional bytes to have a value.

npm1 commented 4 years ago

Currently the spec does not allow this but I agree that allowing this makes sense.

npm1 commented 4 years ago

Tests being added in https://github.com/web-platform-tests/wpt/pull/19812. The Chrome implementation will change in release 80.