 export function hijackClickEvent(container, link) {
    container.addEventListener('click', event => {
        if (event.target.tagName.toLowerCase() === 'a') return;
        event.preventDefault();
        link.dispatchEvent(new MouseEvent('click', {
            bubbles: true,
            cancelable: true,
            view: window,
            ctrlKey: event.ctrlKey,
            metaKey: event.metaKey,
            shiftKey: event.shiftKey,
            altKey: event.altKey,
            button: event.button,
        }));
    });
}
