aom icon indicating copy to clipboard operation
aom copied to clipboard

AccessibleNodeList API feedback

Open domenic opened this issue 9 years ago • 2 comments

In general a lot of this feedback is about not using the same name as DOM APIs but with different semantics or parameters. This feedback is cross-cutting with #25.

  • getNode is useless. Just have an unnamed indexed getter.
  • Do not overload remove().
  • Consider following the Array API more closely. If you use [LegacyArrayClass] you'll get a bunch of methods for free, using names that JS developers are more used to (e.g. push instead of append, splice instead of insertBefore/remove/replace).

domenic avatar Aug 01 '16 10:08 domenic

I'm possibly open to the idea but worried web developers will find it odd given the closer similarity to preexisting DOM methods (insertBefore, etc.) Feels unrealistic to say authors would expect node insertions to be achieved using splice().

cookiecrook avatar Aug 25 '16 23:08 cookiecrook

The API is already in a much worse uncanny valley in that regard. It uses familiar DOM names with different arguments, orderings, return values, and in some cases semantics.

domenic avatar Aug 26 '16 00:08 domenic