async-append icon indicating copy to clipboard operation
async-append copied to clipboard

Overloads of asyncAppend(batch, element), asyncAppend(element) makes optional batch awkward

Open esprehn opened this issue 9 years ago • 1 comments

ex. a library will need to null check the batch and the arguments which is weird.

append(element, batch) means a library like:

doSomething(optional batch = null)

could exist without using apply() and prepending the batch if it's not null.

Can we spec both rest arguments for the start followed by batch?

ex.

asyncAppend(Node... node, DOMBatch = null)

not sure what webidl allows.

@tabatkins @domenic

esprehn avatar Aug 10 '16 22:08 esprehn

I'm pretty sure WebIDL can't do rest arguments followed by additional arguments. I know JS can't; you have to just do a normal rest arg and then pull off the end manually. So we'd have to handle this in prose for all the methods that have rest args (are there actually any?).

tabatkins avatar Aug 11 '16 00:08 tabatkins