pub fn effect_dom<F>(element: &JsValue, action: F, timeout_ms: Option<u32>) -> JsFuture
where
    F: Fn() + 'static,
{
    let timeout = match timeout_ms {
        Some(ms) => ms.into(),
        None => JsValue::UNDEFINED,
    };
    let function = Closure::wrap(Box::new(action) as Box<dyn Fn()>);
    JsFuture::from(until_mutation(
        element,
        function.as_ref().unchecked_ref(),
        timeout,
    ))
}
/**
Perform an action and await a DOM change with an optional timeout.

This function uses the MutationObserver in JS to track whether a change in the DOM has occurred
for the element given or it's subtree, this includes attribute changes.

When a timeout is given, the Future will wait until the allotted time for a change in the DOM
to occur. If no DOM change occurs then this function will panic.

*/
Perform an action and await a DOM change with an optional timeout.
This function uses the MutationObserver in JS to track whether a change in the DOM has occurred
for the element given or it's subtree, this includes attribute changes.

When a timeout is given, the Future will wait until the allotted time for a change in the DOM
to occur. If no DOM change occurs then this function will panic.
Perform an action and await a DOM change with an optional timeout . This function uses the MutationObserver in JS to track whether a change in the DOM has occurred for the element given or it ' s subtree this includes attribute changes . When a timeout is given the Future will wait until the allotted time for a change in the DOM to occur . If no DOM change occurs then this function will panic .
pub fn effect_dom<F>(element: &JsValue, action: F, timeout_ms: Option<u32>) -> JsFuture
where
    F: Fn() + 'static,
{
    let timeout = match timeout_ms {
        Some(ms) => ms.into(),
        None => JsValue::UNDEFINED,
    };
    let function = Closure::wrap(Box::new(action) as Box<dyn Fn()>);
    JsFuture::from(until_mutation(
        element,
        function.as_ref().unchecked_ref(),
        timeout,
    ))
}
pub fn effect_dom < F > ( element : & JsValue , action : F , timeout_ms : Option < u32 > ) -> JsFuture where F : Fn ( ) + ' static , { let timeout = match timeout_ms { Some ( ms ) => ms . into ( ) , None => JsValue :: UNDEFINED , } ; let function = Closure :: wrap ( Box :: new ( action ) as Box < dyn Fn ( ) > ) ; JsFuture :: from ( until_mutation ( element , function . as_ref ( ) . unchecked_ref ( ) , timeout , ) ) }
Perform an action and await a DOM change with an optional timeout.
Perform an action and await a DOM change with an optional timeout .
element
&JsValue
action
F
timeout_ms
Option<u32>
element
&JsValue
action
F
timeout_ms
Option<u32>