Closed cvazac closed 6 years ago
I suspect that there's no debate on 1).
Examples 2) and 3) could be considered discrepant. If we convert the empty string of the first dur
param in 3), we'd get a 0.
Consistency options: A) 2) & 3) both return a 0 duration B) 2) returns 567.8 and 3) returns 123.4
Seems to me that A) is the more consistent option, and it's also what would naturally fall out of HTML's parsing rules.
IMO, we should clarify the spec language around that, and change implementations and tests accordingly.
I think A) is better, since it would make the code a bit easier. I mean we can just take the string after "dur" without checking if it's a valid double value.
fixed with: https://github.com/w3c/server-timing/pull/47
The spec currently reads:
I think we need to clarify three scenarios, where a param name is supplied with no valid param value
1)
metric;dur=123.4;dur=567.8
yields a duration of 123.4 in chrome 2)metric;dur=foo;dur=567.8
yields a duration of 0 in chrome 3)metric;dur;dur=123.4
yields a duration of 123.4 in chrome