Many APIs returning an array of nodes will use NodeList; querySelectorAll, getElementsByTagName, .labels, etc.
Exceedingly few return sequence<Node>. It might just be assignedNodes().
While I harbour no love for NodeList which feels like a historical choice at this point, it might be surprising for developers to find this returning a sequence<Node> when the only other API to do so is a very obscure feature of ShadowDOM.
I don't think it is necessary to change to NodeList, but I do think the explainer should have a note on the inconsistency. DOM refers to these as "old-style collections" so there is perhaps good literature already, but it was something that stood out for me.
Many APIs returning an array of nodes will use
NodeList;querySelectorAll,getElementsByTagName,.labels, etc.Exceedingly few return
sequence<Node>. It might just beassignedNodes().While I harbour no love for
NodeListwhich feels like a historical choice at this point, it might be surprising for developers to find this returning asequence<Node>when the only other API to do so is a very obscure feature of ShadowDOM.I don't think it is necessary to change to
NodeList, but I do think the explainer should have a note on the inconsistency. DOM refers to these as "old-style collections" so there is perhaps good literature already, but it was something that stood out for me.