script::dom::countqueuingstrategy

Function extract_size_algorithm

Source
pub(crate) fn extract_size_algorithm(
    strategy: &QueuingStrategy<DomTypeHolder>,
    _can_gc: CanGc,
) -> Rc<QueuingStrategySize<DomTypeHolder>>
Expand description

Extract the size algorithm from a QueuingStrategy. If the size algorithm is not set, return a fallback function which always returns 1.

https://streams.spec.whatwg.org/#make-size-algorithm-from-size-function