• Return the first ancestor that matches the selector.

    Parameters

    • node: Node
    • selector: string

    Returns Element | null

    Example

    const removeListener = (e) => {
    table.removeChild(component.beforeRemove(parentSelector(e.target, 'tr')));
    };