mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-20 04:00:52 +00:00
This commit adds support for two different features of the "special" operations in WebIDL. First, it implements the desugaring [described by WebIDL][1] where this: interface Dictionary { getter double getProperty(DOMString propertyName); setter void setProperty(DOMString propertyName, double propertyValue); }; becomes ... interface Dictionary { double getProperty(DOMString propertyName); void setProperty(DOMString propertyName, double propertyValue); getter double (DOMString propertyName); setter void (DOMString propertyName, double propertyValue); }; where specifically a named `getter` generates both a getter and a named function. Second it implements the distinction between two different types of getters in WebIDL, described as: > Getters and setters come in two varieties: ones that take a DOMString as a > property name, known as named property getters and named property setters, and > ones that take an unsigned long as a property index, known as indexed property > getters and indexed property setters. The name `get` is given to DOMString arguments, and the name `get_idx` is given to index property getters. [1]: https://heycam.github.io/webidl/#idl-special-operations