sporritt/jsPlumb — pull request #298 by sepans (2014-12-03 17:45:37+00:00)
Title: Fix for using library inside shadowDom (e.g. Polymer etc.)

Checks to see if parent element is shadow root. If it is shadowDOM stops going up the DOM tree
without this change endpointAdded goes up the DOM tree and gets to the shadowDOM 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.