W3C home > Mailing lists > Public > public-webcrypto@w3.org > April 2014

[Bug 25390] Use [Exposed] in IDL

From: <bugzilla@jessica.w3.org>
Date: Tue, 29 Apr 2014 04:01:58 +0000
To: public-webcrypto@w3.org
Message-ID: <bug-25390-7213-NHbEBHIeow@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25390

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu

--- Comment #3 from Boris Zbarsky <bzbarsky@mit.edu> ---
The behavior of [Exposed] depends on what it's specified on.

If specified on an interface, then it affects whether the corresponding
interface object can be retrieved via a property on the global.

So this:

  [Exposed=Window,Worker]
  interface SubtleCrypto {
   // stuff
  };

would mean that "SubtleCrypto" at global scope gives the relevant interface
object in both window scopes and workers.

If specified on an interface member, it controls whether the member is visible
in instances of the interface that have the corresponding global.  So:

  interface Crypto {
    [Exposed=Window,Worker]
    readonly attribute SubtleCrypto subtle;
  };

would mean that Crypto instances in both windows and workers would have a
.subtle property.

That said, I'm not a huge fan of the way webidl handles lack [Exposed] on
interface members right now.  I filed bug 25495 on that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 29 April 2014 04:01:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:22 UTC