Apologies for not updating this thread sooner. I already went ahead and implemented <https://bugs.webkit.org/show_bug.cgi?id=173047> `as()` to reflect what's needed, and was planning to refactor that and add a "ReflectEnum" binding at a later patch. If that's not needed, I can just leave it as is.
On Fri, Jun 9, 2017 at 8:47 PM Sam Weinig <[email protected]> wrote: > > > > 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

