add capture to dom events