These functions help work with element content.
substantiveElements(nodes) static method
Return a set of Elements which are likely to be useful as component content.
NodeList or array of objects, this will return only those array
members that are: a) instances of
and b) not on a blacklist of normally invisible elements (such as
script). Among other things, this filters out Text nodes.
This is used by ContentItemsMixin to filter out nodes
which are unlikely to be interesting as list items. This is intended to
satisfy the Gold Standard checklist criteria Auxiliary
so that a component does not inadvertently treat
<style> and other invisible
items as element content.
NodeList– the list of nodes to filter
Array. the filtered elements