closest icon indicating copy to clipboard operation
closest copied to clipboard

Support shadowDOM elements

Open tusharmath opened this issue 8 years ago • 3 comments

Closest is being used by https://github.com/zenorocha/delegate which I am using in my project. Unfortunately delegate doesn't work for shadowDOM elements because of the strict checking closest is doing with the global document object.

tusharmath avatar Sep 22 '16 07:09 tusharmath

Seems like a good idea to me but is there a simpler way maybe to do the check? Like comparing nodeType? It says here that shadow root is 11

while (parent && parent.nodeType === 1)

ryanve avatar Feb 15 '17 04:02 ryanve

I agree with @ryanve this doesn't look like a very clean approach.

ForbesLindesay avatar Jun 23 '17 03:06 ForbesLindesay

Closest is being used by https://github.com/bpmn-io/min-dom.

https://github.com/bpmn-io/min-dom/issues/5 is also related.

heartyoh avatar Feb 15 '20 20:02 heartyoh