checks to see if parent element is shadow root.
without that endpointAdded goes up the dom tree and gets to the shadow dom and causing this error:
Uncaught TypeError: undefined is not a function dom.jsPlumb-1.7.2.js:2655
window.jsPlumbAdapter.getAttribute dom.jsPlumb-1.7.2.js:2655
(anonymous function) dom.jsPlumb-1.7.2.js:2064
_getId dom.jsPlumb-1.7.2.js:4039
endpointAdded dom.jsPlumb-1.7.2.js:2463
_newEndpoint dom.jsPlumb-1.7.2.js:3916
addEndpoint dom.jsPlumb-1.7.2.js:4101

not sure if checking for host attribute is universally correct but solved my problem