Several interface objects used by the Reporting API were originally not exposed as symbols on the JavaScript global object. This includes Report, ReportBody, and the various specific report body types such as CSPViolationReportBody and DeprecationReportBody. This change exposes those objects on the window (or worker global), bringing the implementation in line with the specification.
The main risk here is that the newly-exposed symbols will collide with symbols defined in existing scripts. Most of the names are quite specific, but "Report" and "ReportBody" may have some existing use. However, this is unlikely to be a problem in practice, as most code which uses these names for its own variables will also continue to work; redefining them in a local script should not have any effect on either the script or the Reporting API. One possibility for breakage would be a script that defines, say, a "Report" object, (unrelated to the Reporting API,) but does so only if it did not previously exist. In that case, the hypothetical script would *not* define its own Report, and would presumably attempt to use the newly-exposed interface object. In order for this to be a real issue, a script would have to: 1. Use one of these symbol names, down to capitalization. I suspect that "Report" is the most probable, with the various ReportBody types being far less likely candidates for collision 2. Specifically guard against re-defining the symbol, even though it's not currently platform-exposed anywhere. This would likely only occur if some initialization code was expected to be run multiple times blindly. (Blink's web test result page, for instance, uses "Report" as an object name, but defines it unconditionally, so it will simply shadow the interface object.)
None
None
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
This is a change to the IDL for these interfaces, and is automatically supported by all Blink platforms.
M110
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK_TSXKUf6wAHB-3EdgP04%2Bcmhgis3j3M54B%3DASXGtHVJcenDQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfV3b3BnY26B6tuGtFFYRm-K5P0U6b5_giLgB1h6PeK7ag%40mail.gmail.com.
Well, that is exactly the situation outlined as a risk. I'm still running some HTTPArchive queries, but didn't immediately see much there.I expect that +Domenic Denicola may have more context on the changes here, but my understanding is that WebIDL has been moving towards this for some time.The issues I'm aware of are on WebIDL:https://github.com/whatwg/webidl/issues/350 renames "NoInterfaceObject" to "LegacyNoInterfaceObject"https://github.com/whatwg/webidl/issues/365 starts mandating the use of "Exposed" in all interfacesReporting specifically was updated in 2019, with https://github.com/w3c/reporting/pull/173, after https://github.com/whatwg/webidl/pull/423 made Exposed mandatory.
On Wed, Nov 23, 2022 at 6:13 PM Ian Clelland <icle...@chromium.org> wrote:Well, that is exactly the situation outlined as a risk. I'm still running some HTTPArchive queries, but didn't immediately see much there.I expect that +Domenic Denicola may have more context on the changes here, but my understanding is that WebIDL has been moving towards this for some time.The issues I'm aware of are on WebIDL:https://github.com/whatwg/webidl/issues/350 renames "NoInterfaceObject" to "LegacyNoInterfaceObject"https://github.com/whatwg/webidl/issues/365 starts mandating the use of "Exposed" in all interfacesReporting specifically was updated in 2019, with https://github.com/w3c/reporting/pull/173, after https://github.com/whatwg/webidl/pull/423 made Exposed mandatory.Is it possible to rename these exposed interfaces to something less generic, that's less likely to collide?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY8pXY9nUDxRwXTheVUCf0A81cZyfJLE7WDA%2B4%3Dqf-DiJQ%40mail.gmail.com.
LGTM3
LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK_TSXKUf6wAHB-3EdgP04%2Bcmhgis3j3M54B%3DASXGtHVJcenDQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfV3b3BnY26B6tuGtFFYRm-K5P0U6b5_giLgB1h6PeK7ag%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Note that in the past I've suggested these not be interfaces at all: https://github.com/w3c/reporting/issues/216 . As far as I can tell that issue is still open, and it would have been better to resolve it by making everything use dictionaries (or even just non-dictionary objects, like several specs do today) instead of creating new interfaces against proposed W3C TAG Design Principles.
Also that there is no spec for several of these interfaces (at least CoopAccessViolationReportBody, possibly others). So I think there's considerable interop risk.
LGTM3
LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK_TSXKUf6wAHB-3EdgP04%2Bcmhgis3j3M54B%3DASXGtHVJcenDQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfV3b3BnY26B6tuGtFFYRm-K5P0U6b5_giLgB1h6PeK7ag%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
On Fri, Nov 25, 2022 at 5:50 AM Domenic Denicola <dom...@chromium.org> wrote:Note that in the past I've suggested these not be interfaces at all: https://github.com/w3c/reporting/issues/216 . As far as I can tell that issue is still open, and it would have been better to resolve it by making everything use dictionaries (or even just non-dictionary objects, like several specs do today) instead of creating new interfaces against proposed W3C TAG Design Principles.Thanks Domenic. Turning those into dictionaries does sound appealing. Let's wait to hear what Ian says.Also that there is no spec for several of these interfaces (at least CoopAccessViolationReportBody, possibly others). So I think there's considerable interop risk.That interop risk is orthogonal to whether we expose those interfaces or not, right? Not saying it shouldn't be fixed, just that the risk exists already.
On Fri, Nov 25, 2022, 14:53 Yoav Weiss <yoav...@chromium.org> wrote:On Fri, Nov 25, 2022 at 5:50 AM Domenic Denicola <dom...@chromium.org> wrote:Note that in the past I've suggested these not be interfaces at all: https://github.com/w3c/reporting/issues/216 . As far as I can tell that issue is still open, and it would have been better to resolve it by making everything use dictionaries (or even just non-dictionary objects, like several specs do today) instead of creating new interfaces against proposed W3C TAG Design Principles.Thanks Domenic. Turning those into dictionaries does sound appealing. Let's wait to hear what Ian says.Also that there is no spec for several of these interfaces (at least CoopAccessViolationReportBody, possibly others). So I think there's considerable interop risk.That interop risk is orthogonal to whether we expose those interfaces or not, right? Not saying it shouldn't be fixed, just that the risk exists already.I don't think it's orthogonal. Once the interfaces are exposed, they're much easier to depend on the existence of, and given that there is no spec for their shape or behavior, such dependence seems like an Interop risk.
I'd like the API Owners to reconsider their LGTMs in light of these unresolved discussions. At the very least, I think at TAG review is warranted for this, as there are architectural implications here. But fixing the spec situation would be even better.
On Fri, Nov 25, 2022 at 1:54 AM Domenic Denicola <dom...@chromium.org> wrote:On Fri, Nov 25, 2022, 14:53 Yoav Weiss <yoav...@chromium.org> wrote:On Fri, Nov 25, 2022 at 5:50 AM Domenic Denicola <dom...@chromium.org> wrote:Note that in the past I've suggested these not be interfaces at all: https://github.com/w3c/reporting/issues/216 . As far as I can tell that issue is still open, and it would have been better to resolve it by making everything use dictionaries (or even just non-dictionary objects, like several specs do today) instead of creating new interfaces against proposed W3C TAG Design Principles.Thanks Domenic. Turning those into dictionaries does sound appealing. Let's wait to hear what Ian says.Also that there is no spec for several of these interfaces (at least CoopAccessViolationReportBody, possibly others). So I think there's considerable interop risk.That interop risk is orthogonal to whether we expose those interfaces or not, right? Not saying it shouldn't be fixed, just that the risk exists already.I don't think it's orthogonal. Once the interfaces are exposed, they're much easier to depend on the existence of, and given that there is no spec for their shape or behavior, such dependence seems like an Interop risk.Most of these are spec'd:ReportBody: https://w3c.github.io/reporting/#reportbodyCSPViolationReportBody: https://www.w3.org/TR/CSP3/#cspviolationreportbodyDeprecationReportBody: https://wicg.github.io/deprecation-reporting/#deprecationreportbodyInterventionReportBody: https://wicg.github.io/intervention-reporting/#interventionreportbodyCoopAccessViolationReportBody and DocumentPolicyViolationReportBody are not. CrashReportBody *is*, though not usefully, as it's not observable.
I'm definitely not against turning these into WebIDL dictionaries, as they don't actually have any behaviour - they're just a collection of named data. They were originally defined as interfaces, I believe, in order to spec the constraints on the names and types of their data members. Using plain objects at the time would have made that more difficult. As I understand it, WebIDL dictionaries do not expose any symbols on the global namespace, so that would remove the compatibility concern.I'd like the API Owners to reconsider their LGTMs in light of these unresolved discussions. At the very least, I think at TAG review is warranted for this, as there are architectural implications here. But fixing the spec situation would be even better.I'll revert the change for now, and take a pass at changing the specs involved.Thanks for weighing in, Domenic!
WebKit has been doing some work implementing the Reporting API:
https://bugs.webkit.org/show_bug.cgi?id=189365
Do we know their plans regarding this topic? Should we ask for signals?