We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I use plain Firebase JavaScript SDK API, I deal with JS promises and can easily handle success and errors:
firebase.database().ref(`/posts/${postId}`).set({ body: text }).then(response => { // do something }).catch(error => { // handle error });
But if I use e.g. <firebase-document>, how do I know if the data was successfully written to the database or an error occurred (and which one)?:
<firebase-document>
<firebase-document path="/posts/[[postId]]/body" data="{{text}}"> </firebase-document>
Seems, only <firebase-auth> web component can fire error events:
<firebase-auth>
error
<firebase-auth provider="google" user="{{user}}" on-error="handleError"> </firebase-auth>
But error event is not listed in https://webcomponents.org/element/firebase/polymerfire/elements/firebase-auth#events.
The following JSDoc annotation should be added to <firebase-auth> source code to fix it:
/** * Fired when an error occurs. * * @event error * @param {Object} The returned error object. */
What about adding error events to other PolymerFire web components? And how to handle success? What about adding success events?
success
The text was updated successfully, but these errors were encountered:
@tjmonsi @mbleigh PTAL.
Sorry, something went wrong.
@merlinnot PTAL.
No branches or pull requests
If I use plain Firebase JavaScript SDK API, I deal with JS promises and can easily handle success and errors:
But if I use e.g.
<firebase-document>
, how do I know if the data was successfully written to the database or an error occurred (and which one)?:Seems, only
<firebase-auth>
web component can fireerror
events:But
error
event is not listed in https://webcomponents.org/element/firebase/polymerfire/elements/firebase-auth#events.The following JSDoc annotation should be added to
<firebase-auth>
source code to fix it:What about adding
error
events to other PolymerFire web components? And how to handle success? What about addingsuccess
events?The text was updated successfully, but these errors were encountered: