Re: [heycam/webidl] Describe JSON-LD with WebIDL - How to handle @ tags (#541)

Realistically, you have a few options, if these are meant to be objects implemented by the browser (and hence interfaced with via Web IDL):

1. You could use an IDL maplike, so `thing.get("@context")` would work.
2. You could use an IDL named getter, so `thing["@context"]` would work, but with somewhat different semantics from a readonly attribute.
3. You could define some sort of name-mangling scheme that maps `@foo` onto a valid Web IDL identifier.

What you probably can't get browsers to implement is having an object that has a bunch of stuff defined in IDL and oh, some other properties that are not defined in IDL.

If these are not objects meant to be implemented by browsers, then I'm not sure why one would use Web IDL for defining them, necessarily.

-- 
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/541#issuecomment-379747593

Received on Monday, 9 April 2018 13:16:52 UTC