NUKnightLab / NUKnightLab/TimelineJS3
"loaded" and "dataloaded" events don't seem to fire
Open
Nobody has claimed this yet.
Bug
- Dominant language
- JavaScript
- Stars
- 3.2k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Unless I have misunderstood the API, the "loaded" and "dataloaded" events seem to fire before we have a chance to register an event handler.
function alerter(s) {
return function() { alert(s); };
}
// https://github.com/NUKnightLab/TimelineJS3/blob/3.3.7/API.md#events
// events that don't fire as expected:
// loaded, dataloaded
var events = [
"back_to_start",
"change",
"dataloaded",
"loaded",
"zoom_in",
"zoom_out",
"nav_next",
"nav_previous"
];
timeline = new TL.Timeline(
'timeline-embed',
'https://docs.google.com/spreadsheets/d/1cWqQBZCkX9GpzFtxCWHoqFXCHg-ylTVUWlnrdYMzKUI/pubhtml'
);
events.forEach(function(evt) {
timeline.on(evt, alerter(evt));
});
Test Case
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior using the linked JSFiddle and compare it with the loaded and dataloaded entries in API.md. Trace when those events are emitted relative to the TL.Timeline construction and handler registration; done means the handlers in the example receive both events as documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100