Skip to main content

live_iterator

Function live_iterator 

Source
pub fn live_iterator<'js, C>(ctx: &Ctx<'js>, iter: C) -> Result<Class<'js, C>>
where C: JsClass<'js> + 'js,
Expand description

Create a WebIDL iterator instance, wiring its prototype the first time: the prototype inherits %IteratorPrototype% (so it’s tagged [object Iterator]) and next becomes enumerable. Idempotent — later calls skip the setup — so callers just build iterators and never register anything separately.