Re: [heycam/webidl] Need pattern for feature detecting dictionary members (#107)

> even though they both return the same answer

They might not, actually.  The key might be supported in one method but not another.  To be more precise, right now if a spec has:

    dictionary SomeDict {
        long key1;
        long key2;
    };

and that dictionary is used by two separate methods from two separate specs, and "key2" is a recent addition that the UA supports in one of the specs but not the other, then right now a UA can easily and transparently rewrite this in terms of two different dictionary types with different names, one with just key1, one with both keys.  And UAs do that.  This is a problem for the "let's just expose the dictionary name" thing too, for what it's worth.

Now of course the UA could just use SomeDict in the API where it doesn't actually support "key2" yet, but then support detection via getters would be broken too.

-- 
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/107#issuecomment-304170459

Received on Friday, 26 May 2017 01:57:15 UTC