Skip to content

Latest commit

 

History

History
22 lines (11 loc) · 979 Bytes

README.md

File metadata and controls

22 lines (11 loc) · 979 Bytes

jquery-polymer

this jquery plugin extend several jquery functions for web components manpulations specialy accessing web components internal shadow root and template elements:

$.nativeShadowDOM() this function return true if the browser already support shadow dom natively without any polyfill

$("#element").hasShadowRoot() this function return true if the selected element has shadow root

$("#element").shadow() or $("#element").getShadowRoot() this function return the element shadow root as Jquery object where you can access internal template items for example you can do $("#element").shadow().find("#my-button")

$("#element").getOwnerShadowRoot() this function return the parent element shadow root if the selected element is inside a web component template

$("#element").find(":shadow") this psudo selector refere to any elemnt shadow root

also this plugin fix jquery offset() function for any element inside a webcomponent (shadow root)