Events should bubble up through, essentially, the composed dom tree. The
event target changes as the event crosses ShadowDOM boundaries (if you are
inclined, see
http://w3c.github.io/webcomponents/spec/shadow/#event-retargeting), but
there is a new `path` property on the event object which describes the
entire path of the event.


On Wed, Jul 9, 2014 at 5:57 PM, Michael Bleigh <[email protected]> wrote:

> To me, the best model for handling errors in rich JS apps has always been
> event capture. By trapping an event at an appropriate DOM level you can
> provide appropriate feedback to the user. I'm having trouble implementing
> this kind of error handling in my Polymer app, and I think it has to do
> with Shadow DOM event bubbling.
>
> I'd like to be able to have multiple nested layers of shadow DOM,
> specifically with <core-ajax> elements, but be able to hear the core-error
> events all the way up the stack (and hopefully all the way to document).
> This would allow me to, e.g., display a proper error at the form level when
> a form submission fails, but for generic fetch errors display a global
> error message.
>
> So far trying to do this has not yielded success. The events don't seem to
> be bubbling through which may well be as intended. Do you have any advice
> on error handling other than "attach an on-core-error to every single
> core-ajax in your app"? I have a few ideas, but wanted to know if there was
> a clever way anyone on here has figured out.
>
> 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/3f323983-8003-4d14-a23e-dacae2556232%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/3f323983-8003-4d14-a23e-dacae2556232%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/CA%2BrMWZhTJr9ALi%3DBZF8svNOxeGtLmmijC_UK64c_zcnxH29XNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to