pub(crate) trait CollectionSource: JSTraceable {
// Required method
fn iter<'a>(
&'a self,
root: &'a Node,
) -> Box<dyn Iterator<Item = DomRoot<Element>> + 'a>;
}Expand description
Alternative to CollectionFilter that provides elements directly via
a custom iterator, rather than filtering a tree traversal. This is more
efficient when the collection’s elements can be enumerated directly
(e.g. selectedOptions iterating only the select’s list of options).