Skip to content
New issue

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

Added set source callback #20

Merged
merged 2 commits into from
May 21, 2018
Merged

Added set source callback #20

merged 2 commits into from
May 21, 2018

Conversation

sunknudsen
Copy link
Contributor

The purpose of the setSourceCallback option is to be able to "listen" to changes in the src of the image element attached to Avatar. This is useful to cache sources provided by third parties such as Gravatar at the app level in order to eliminate image flickering that occurred when refreshing views in single page apps.

@coveralls
Copy link

coveralls commented May 20, 2018

Coverage Status

Coverage increased (+0.02%) to 99.123% when pulling 207c219 on sunknudsen:master into d44409d on MatthewCallis:master.

@MatthewCallis
Copy link
Owner

Hey thanks! Can you write a test for this option too, and the build/ files look like they were built with a different set of browser compatibility, can you just update or remove them and I will rebuild on merge? Thanks!

@sunknudsen
Copy link
Contributor Author

Hey @MatthewCallis, I added the test.

Not sure what's up with build/avatar.js.

The changes occurred after running npm run-script make.

Perhaps Rollup is using the same .babelrc which is configured for browser targets.

How can I rebuild for Node.js?

Thanks!

@MatthewCallis MatthewCallis merged commit acf6257 into MatthewCallis:master May 21, 2018
@MatthewCallis
Copy link
Owner

@sunknudsen
Copy link
Contributor Author

Awesome, thanks Matthew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants