pub(crate) trait CollectionSource: JSTraceable {
// Required method
fn iter<'b>(
&'b self,
no_gc: &'b NoGC,
root: &'b Node,
) -> Box<dyn Iterator<Item = UnrootedDom<'b, Element>> + 'b>;
}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).