-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate interface for controlling page and presenting page #91
Comments
@schien Thanks for the concrete proposal. All - @tidoust has a nice explanation in the Conformance classes definition issue why this separation makes very much sense. Please read the issue, and let the group know if you have any concerns with separating the interfaces to reflect the two conformance classes of products as follows (naming subject to change): opening user agent (or controlling user agent to align with #95) and presenting user agent. This issue proposes the first concrete change to implement this separation. @mfoltzgoogle How would you like to proceed with baking this into the spec? I suggest you coordinate with @schien who volunteered to help. |
I think I would like to define the conformance classes for the controlling/opening browsing context and the presenting browsing context as in #93 and re-outline the document as best as I can along those lines. Then it will be easier to introduce the new interfaces proposed by @schien since they will have a logical place in the new document. |
A naming idea: So we leave what we have for the presentation where it is and move the sender API to the shorter interface. |
It seems no concerns raised with the general direction proposed by @schien. It also appears we've not yet settled on the interface naming. We should first update the Conformance section using the @tidoust's proposal as a starting point and bake in the changes to the normative parts when consensus emerges on naming. All - please let us know your preference and/or suggestions with respect to naming. @mfoltzgoogle Feel free to update the Conformance section with a note stating that the rest of the spec have not yet been reworked to match the conformance classes split. |
@schien what do you think of: interface Presentation {
attribute PresentationSession? defaultRequest;
readonly attribute PresentationReceiver? receiver;
};
interface PresentationReceiver : EventTarget {
Promise<PresentationSession> getSession();
Promise<sequence<PresentationSession>> getSessions();
attribute EventHandler onsessionavailable;
}; I think it has the benefit of splitting the receiver and sender APIs and also provide a good way to find out whether the current browsing context is a receiver (ie. navigator.presentation.receiver is not null). |
Overall looks good to me, but I still prefer |
I think
|
@sicking, an opinion? |
I'm fine with any of the proposals here, but I'd probably go with @mounirlamouri's proposal if I had to choose. |
I like the idea of sticking to the That's more an editorial point perhaps but since we'll end up with two conformance classes in the spec, it seems good to have separate IDL for each class of products to be able to say "the controlling user agent MUST implement the interface defined in section X.Y." instead of "the controlling user agent MUST implement the How would you define the resulting |
We can't really have two partial interfaces because we need a |
…s it. This is moving around some spec definitions to apply on PresentationReceiver instead of Presentation, the examples have been changed and navigator.presentation.receiver has been defined. Fixes w3c#91.
@mounirlamouri Please submit a PR with your proposal. It is probably easier for the participants to review the changes in context. I suggest you update the conformance section to match in the same PR (you can borrow the language from #93) and cross-reference the conformance classes appropriately. As long as the spec is clear to implementers (what must be implemented/tested) and authors (albeit there are surely better API docs for web developers than specs) on the division, we should be fine with @mounirlamouri's proposal even if the spec would end up being a bit more verbose that way. The extra editorial cost will pay off. |
FWIW, the PR is up and was sent between my previous comment and yours. It should show up in GH UI. For those who interact on issues via email, it is issue #186. |
…s it. This is moving around some spec definitions to apply on PresentationReceiver instead of Presentation, the examples have been changed and navigator.presentation.receiver has been defined. Fixes w3c#91.
Currently we mix the API for controlling page and presenting page in
NavigatorPresentation
and developer will usenavigator.presentation
as the entry point.Since we are providing more and more advance feature in this API (see #19), it's cumbersome to provide statement on the usage of each attribute/function.
Therefore I propose to move all presenting page APIs into a different interface, called
PresentingContext
. The example definition will looks like:The text was updated successfully, but these errors were encountered: