NUKnightLab / NUKnightLab/TimelineJS3
Empty style element on new Timeline
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.2k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
What went wrong
When calling the timeline constructor a new empty style tag is added to the head
What was expected
No addition of empty tags
Minimal working example
<!DOCTYPE html>
<html>
<head>
<link
rel="stylesheet"
href="https://cdn.knightlab.com/libs/timeline3/latest/css/timeline.css"
/>
<script src="https://cdn.knightlab.com/libs/timeline3/latest/js/timeline.js"></script>
</head>
<body>
<button onclick="loadTimeline()">Click me!</button>
<div id="tl1" style="width: 100%; height: 600px"></div>
<script type=text/javascript> function loadTimeline() { new
TL.Timeline('tl1','https://docs.google.com/spreadsheets/d/1cWqQBZCkX9GpzFtxCWHoqFXCHg-ylTVUWlnrdYMzKUI/pubhtml');
}
</script>
</body>
</html>
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
Start with the TL.Timeline constructor shown in the minimal working example and reproduce the issue in a page using the provided CDN assets. Trace the constructor's DOM and style setup, then verify that creating a timeline no longer adds an empty style element to the document head.
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
- 45/100