Re: [heycam/webidl] Consider syntactic changes to WebIDL to make it more "JavaScript-y" (#485)

> I don't see how. [SecureContext] controls exposure.

Oops, [SecureContext] was a bad example.  Never mind.

> Does Chrome's RuntimeEnabled thing work on a per-overload basis? What happens if you set it on only some overloads of a single method?

Yes, it works on a per-overload basis.  [RuntimeEnabled] changes an effective overload set.  Depending on whether the flag is enabled or not, an invocation might cause a TypeError or extra type conversion.

For example,

```WebIDL
interface X {
  [RuntimeEnabled=F] void foo(long);
  void foo(DOMString);
}
```

`foo(42)` will be treated as an invocation of `foo(long)` if F is enabled, otherwise as `foo(DOMString)` with a conversion from 42 to "42".

IIRC, [OriginTrial] is another example we wanted to apply to constructor.  [OriginTrial] also affects an effective overload set.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/485#issuecomment-449024297

Received on Thursday, 20 December 2018 14:53:30 UTC