> On Jun 2, 2017, at 11:32 AM, Ryosuke Niwa <[email protected]> wrote: > > On Fri, Jun 2, 2017 at 9:18 AM, Chris Dumez <[email protected]> wrote: >> Hi, >> >> No, I do not believe WebKit supports ReflectOnly and this is not standard >> IDL either. >> >> The way to do it in WebKit would be to use a regular DOMString attribute, as >> in the specification and implement this logic in the c++ getter for this >> attribute. See HTMLElement::dir() for an example. >> >> We could also consider adding support for something like ReflectOnly in our >> bindings generator considering that this seems to be used quite a bit in the >> HTML specification and it would decrease code complexity a little. >> I’d actually be in favor of that. > > I'd suggest other names like "ReflectEnum" or even "Reflect<EnumType>" > where EnumType is the name of enum that defines the list of values. > > "ReflectOnly" doesn't tell us on what "only" applies. If I didn't know > the context, it sounds like something that does less work than regular > "Reflect”.
I don’t see a good reason to complicate the bindings until this becomes more common place. For now, I would just implement HTMLLinkElement::as() to behave as you want and leave the IDL unannotated, and we can revisit it at a later time. - Sam _______________________________________________ webkit-dev mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-dev

