Hi Carlos,

It looks like jQuery does some "is this element in the document" checks
before deciding to apply the animation.
However, ShadowDOM spec says that document.contains(someNodeInShadowRoot)
should return false for encapsulation reasons.

Polymer's gesture library implements a "deepContains" method that works
around the ShadowDOM limitation.
As a total hack, I tried setting jQuery.contains =
PolymerGestures.deepContains, and that worked.

This is absolutely not supported, and I'm suprised it worked, but maybe you
can use that for now.

I suspect that jQuery will have to implement something similar to support
ShadowDOM's notion of contains sooner or later.


On Tue, May 13, 2014 at 10:07 PM, Carlos Alberto Castaño García <
[email protected]> wrote:

> Hi,
>
> I'm testing Custom Elements and I've found this:
>
> $.hide('fast') ---> Doesn't work inside Shadow DOM
> $.hide() ----> Works on Shadow DOM
>
> Out Shadow DOM both works.
>
> Here's a test: http://jsfiddle.net/Ysasn/4/
>
> Some idea?
>
> Thanks
>
> Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/75036026-ec35-448d-97ef-5f120572c76e%40googlegroups.com<https://groups.google.com/d/msgid/polymer-dev/75036026-ec35-448d-97ef-5f120572c76e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CAAUAVAgGgPHRaP_0hf5_HSr1A%3Dr7itTJbxSRtTTPeU8LgE9Fog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to