Problem with defer loading in Rails
kosappi opened this issue · 2 comments
kosappi commented
If defer
attribute is given to javascript_include_tag
in Rails, no chart is drawn.
When I execute Highcharts.chart(…
from devtool of the browser, it is drawn, so I expect that there is a problem with the execution timing.
This problem did not occur with using addEventListener
instead of window.onload
.
So I committed my fix to forked repository.
kosappi@620180d
I tested this commit with my Rails application.
I completed the 4 steps below:
- Fork the project -> https://github.com/kosappi/lazy_high_charts
- Do your changes and commit them to your repository -> kosappi@620180d
- Test your changes. We won't accept any untested contributions (except if they're not testable).
- Create an issue with a link to your commits.
via: https://github.com/michelson/lazy_high_charts#contributing
xiaods commented
welcome pr on this patch.