- From: Anssi Kostiainen via GitHub <sysbot+gh@w3.org>
- Date: Wed, 10 Feb 2016 14:54:53 +0000
- To: public-secondscreen@w3.org
To make programmatic IDL extraction possible, you could split IDL
blocks using `partial interface` as follows:
```
<pre class="idl idl-controlling-ua">
partial interface Presentation {
attribute PresentationRequest? defaultRequest;
};
</pre>
<pre class="idl idl-receiving-ua">
partial interface Presentation {
[SameObject] readonly attribute PresentationReceiver? receiver;
};
</pre>
```
The spec is currently worded as per option 1, i.e. the attributes are
null in the other context:
>In a controlling user agent, the `defaultRequest` attribute must
return the default presentation request if any, null otherwise.
>In a receiving user agent, the `receiver` attribute must return the
`PresentationReceiver` instance associated with the receiving browsing
context and created by the receiving user agent when the receiving
browsing context is created. In any other browsing context, it must
return null.
To specify this as per option 2, i.e. the attributes do not exist in
the other context, we would probably need to use the [\[Exposed\]
extended attribute][1], and define another global object e.g.
`PresentationWindow` to be used in the receiving browsing context, and
then add `[Exposed=PresentationWindow]` in front of the latter
`partial interface Presentation` IDL block. There may be other
caveats.
All - which way would be preferred?
[1]: https://heycam.github.io/webidl/#Exposed
--
GitHub Notification of comment by anssiko
Please view or discuss this issue at
https://github.com/w3c/presentation-api/issues/230#issuecomment-182406657
using your GitHub account
Received on Wednesday, 10 February 2016 14:54:54 UTC