WICG / deprecation-reporting

Deprecation reporting (from Web Perf WG)
https://wicg.github.io/deprecation-reporting/
Other
3 stars 5 forks source link

Rename sourceFile #14

Open ByteEater-pl opened 1 year ago

ByteEater-pl commented 1 year ago

sourceFile: If known, the file which first used the indicated API, or null otherwise.

There is no notion of file on the Web. There are resources and their representations. Or entities (in the HTTP sense, not markup). I suggest renaming. Or, if unfortunately already entrenched (like window which needn't represent a window), changing the description.

clelland commented 1 year ago

"Resource" is certainly more accurate (I don't think it's feasible to try to specify a single representation; they're generally not identifiable in the way that the underlying resource is). That said, the field name was chosen to align with the corresponding field in CSP violation reports

ByteEater-pl commented 1 year ago

I see. That's unfortuante, but sourceFile is already in CSP Level 2 which is a Rec. So if there's strong preference for being consistent with it, the least that stands from my issue is to change the description so that it doesn't use the term file. For example:

sourceFile: If known, URI of the resource in whose representation processed by the user agent the indicated API has been first used, or null otherwise.