- From: Travis Leithead <notifications@github.com>
- Date: Mon, 21 Dec 2015 08:08:47 -0800
- To: whatwg/dom <dom@noreply.github.com>
Received on Monday, 21 December 2015 16:09:15 UTC
FWIW I like the names. To your point, these APIs must operate on a tree, so there's always a question of "before what?" and "after what?". The same questions could be said of insertBefore from a DOM newbie. I use the following logic to figure it out. 1. before = insertBefore, ergo after = "insertAfter"... i.e. a sibling operation. 2. append = appendChild, ergo prepend = "prependChild" a child list operation. *if* I was considering an alterative short name, I might be inclined towards "next" and "previous" due to their similarity to nextSibling and previousSibling--unfortunately those names are probably also confusing in their own way, not to mention that "next" runs into problems with iterators... --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/134#issuecomment-166344019
Received on Monday, 21 December 2015 16:09:15 UTC