WICG / fenced-frame

Proposal for a strong boundary between a page and its embedded content
https://wicg.github.io/fenced-frame/
Other
120 stars 29 forks source link

Say something about what eventTypes are valid #126

Open jyasskin opened 9 months ago

jyasskin commented 9 months ago

https://wicg.github.io/fenced-frame/#dom-fenceevent-eventtype doesn't have any uses that say what values are expected to work in that field. There's one instance of "If event’s eventType is not "reserved.top_navigation", return.", which implies that systems are expected to recognize specific values, but I don't see any way for them to find specific values to recognize.

shivanigithub commented 9 months ago

The values are allowed to be arbitrary strings and "reserved.top_navigation" is currently the only keyword but more might be added in future.

shivanigithub commented 9 months ago

cc @gtanzer

jyasskin commented 9 months ago

https://wicg.github.io/shared-storage/#reporting currently has "If a SharedStorageUrlWithMetadata object contains a non-empty reportingMetadata object in the form of a dictionary whose keys are eventTypes ...", which doesn't make sense if eventTypes aren't constrained in any way. That could be a bug in the shared-storage spec. (cc @pythagoraskitty)

But there are still some constraints. I see that the eventType is expected to be a key in the reporting url map, for example. It winds up being hard to read the spec if relationships like this aren't called out and instead require tracing values through several levels of algorithms.

domfarolino commented 9 months ago

which doesn't make sense if eventTypes aren't constrained in any way.

Eh, maybe? I mean the keys of that map could simply be DOMStrings which isn't "wrong". But yeah elaborating on the overall relationship of all of these would be nice.