lib/WebDriverExpectedCondition.php
public static function stalenessOf(WebDriverElement $element)
    {
        return new static(
            function () use ($element) {
                try {
                    $element->isEnabled();

                    return false;
                } catch (StaleElementReferenceException $e) {
                    return true;
                }
            }
        );
    }
public static function stalenessOf(WebDriverElement $element)
    {
        return new static(
            function () use ($element) {
                try {
                    $element->isEnabled();

                    return false;
                } catch (StaleElementReferenceException $e) {
                    return true;
                }
            }
        );
    }
public static function stalenessOf ( WebDriverElement $ element ) { return new static ( function ( ) use ( $ element ) { try { $ element -> isEnabled ( ) ; return false ; } catch ( StaleElementReferenceException $ e ) { return true ; } } ) ; }
Wait until an element is no longer attached to the DOM.

@param WebDriverElement $element The element to wait for.
@return static Condition returns whether the element is still attached to the DOM.
Wait until an element is no longer attached to the DOM .