jakearchibald / jakearchibald/streaming-html
Is this more flexible?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 55
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
This is my code, but I'm not sure if there will be a problem.
```javascript
const iframe = document.createElement("iframe");
iframe.style.display = "none";
document.body.appendChild(iframe);
iframe.onload = () => {
iframe.onload = null;
var xhr = new XMLHttpRequest();
var pos = 0;
xhr.onprogress = function() {
iframe.contentDocument.write(xhr.response.slice(pos));
pos = xhr.response.length;
while (iframe.contentDocument.body.childNodes.length > 0) {
content.appendChild(iframe.contentDocument.body.childNodes[0]);
}
};
xhr.onload = function() {
iframe.contentDocument.close();
document.body.removeChild(iframe);
};
xhr.responseType = "text";
xhr.open("GET", "comments.inc.txt");
xhr.send();
};
iframe.src = "";
```
Contributor guide
No contributing guide indexed for this repository
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
The issue only provides an inline JavaScript approach using a hidden iframe, XMLHttpRequest, and comments.inc.txt; no repository file or test is named. Start by locating the related implementation and clarifying what behavior should be more flexible, then define the expected result and a test or reproducible example before making changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100