HoriSun / closure-compiler

Automatically exported from code.google.com/p/closure-compiler
0 stars 0 forks source link

[Feature Request] Support notation for Dictionary type in WebIDL. #1312

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Could you support Dictionary type in WebIDL, 
http://www.w3.org/TR/WebIDL/#idl-dictionary? 

I would like to have externs for DOM Level 3 Event.

dictionary EventInit {
    boolean bubbles = false;
    boolean cancelable = false;
};

Note: Dictionary type is inheritable:

dictionary Derived : Base {
  dictionary-members…
};

JS Externs can be look like:

dictionary Base {
  long optional_member = 0;
  boolean required_member;
};

dictionary Derived : Base {
  long other_member;
};

/**
 * @dictionary {
 *   optional_member: number=,
 *   required_member: boolean
 */
var Base;

/**
 * @extends {Base}
 * @dictionary {
 *  other_member: number
 * }
 */
var Derived;

Original issue reported on code.google.com by yosin@chromium.org on 22 Apr 2014 at 6:07

GoogleCodeExporter commented 9 years ago
Issue tracking has been migrated to github. Please make any further comments on 
this issue through https://github.com/google/closure-compiler/issues

Original comment by blic...@google.com on 1 May 2014 at 6:31

GoogleCodeExporter commented 9 years ago

Original comment by blic...@google.com on 1 May 2014 at 6:34