Function parentSelector

  • Return the first ancestor that matches the selector.

    Parameters

    • node: Node
    • selector: string

    Returns Element | null

    Example

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