RESOLVED CONFIGURATION CHANGED 108906
'dictionary' should be supported by WebKit IDL
https://bugs.webkit.org/show_bug.cgi?id=108906
Summary 'dictionary' should be supported by WebKit IDL
Kentaro Hara
Reported 2013-02-04 22:07:21 PST
Web IDL spec: http://www.w3.org/TR/WebIDL/#idl-dictionaries Use cases: https://cvs.khronos.org/svn/repos/registry/trunk/public/webcl/spec/latest/index.html Currently 'dictionary' is parsed by IDLParser.pm but it is ignored by code generators.
Attachments
Kentaro Hara
Comment 1 2013-02-04 22:15:54 PST
FYI, there had been a plan to use 'dictionary' for event constructors. There should be other use cases in the future.
Antonio Gomes
Comment 2 2013-02-13 20:36:11 PST
Kentaro told me, @nbarth won't be able to work on this for now. Taking ...
Alexey Proskuryakov
Comment 3 2013-10-10 14:19:11 PDT
WebCrypto uses dictionaries too. That said, it seems unclear how "dictionary" is different from "interface", except for minor syntactic sugar. Can someone please explain?
Alexey Proskuryakov
Comment 4 2013-10-10 14:37:59 PDT
Or rather how it's different from Object, I guess.
Antonio Gomes
Comment 5 2013-10-10 15:03:34 PDT
(In reply to comment #3) > WebCrypto uses dictionaries too. > > That said, it seems unclear how "dictionary" is different from "interface", except for minor syntactic sugar. Can someone please explain? That is a good question. I would say a 'dictionary' is the as a strong-typed 'interface with only read-only parameters'. For example: - in JS: var a = {x: bleh, y: blah}; - in c++: the dictionary would have "x" member variable defined whose type is a Bleh class. IDL would have something like: dictionary Foo { Bleh x; Blah y; } Based on the, the the binding could do the casts needed. Please correct if I am wrong. It lacks a formal definition in WebIDL as far as I can tell.
Anne van Kesteren
Comment 6 2023-05-28 09:22:32 PDT
Looking at how this works for addEventListener() this appears to be resolved.
Note You need to log in before you can comment on or make changes to this bug.